Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(319)

Side by Side Diff: chrome/browser/devtools/global_confirm_info_bar.h

Issue 2354673004: Add TabStripModel as a parameter of some functions in TabStripModelObserver (Closed)
Patch Set: Last nits Created 4 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef CHROME_BROWSER_DEVTOOLS_GLOBAL_CONFIRM_INFO_BAR_H_ 5 #ifndef CHROME_BROWSER_DEVTOOLS_GLOBAL_CONFIRM_INFO_BAR_H_
6 #define CHROME_BROWSER_DEVTOOLS_GLOBAL_CONFIRM_INFO_BAR_H_ 6 #define CHROME_BROWSER_DEVTOOLS_GLOBAL_CONFIRM_INFO_BAR_H_
7 7
8 #include <map> 8 #include <map>
9 9
10 #include "base/macros.h" 10 #include "base/macros.h"
(...skipping 18 matching lines...) Expand all
29 std::unique_ptr<ConfirmInfoBarDelegate> delegate); 29 std::unique_ptr<ConfirmInfoBarDelegate> delegate);
30 void Close(); 30 void Close();
31 31
32 private: 32 private:
33 explicit GlobalConfirmInfoBar( 33 explicit GlobalConfirmInfoBar(
34 std::unique_ptr<ConfirmInfoBarDelegate> delegate); 34 std::unique_ptr<ConfirmInfoBarDelegate> delegate);
35 ~GlobalConfirmInfoBar() override; 35 ~GlobalConfirmInfoBar() override;
36 class DelegateProxy; 36 class DelegateProxy;
37 37
38 // TabStripModelObserver: 38 // TabStripModelObserver:
39 void TabInsertedAt(content::WebContents* web_contents, 39 void TabInsertedAt(TabStripModel* tab_strip_model,
40 content::WebContents* web_contents,
40 int index, 41 int index,
41 bool foreground) override; 42 bool foreground) override;
42 void TabChangedAt(content::WebContents* web_contents, 43 void TabChangedAt(content::WebContents* web_contents,
43 int index, 44 int index,
44 TabChangeType change_type) override; 45 TabChangeType change_type) override;
45 46
46 // infobars::InfoBarManager::Observer: 47 // infobars::InfoBarManager::Observer:
47 void OnInfoBarRemoved(infobars::InfoBar* info_bar, bool animate) override; 48 void OnInfoBarRemoved(infobars::InfoBar* info_bar, bool animate) override;
48 void OnManagerShuttingDown(infobars::InfoBarManager* manager) override; 49 void OnManagerShuttingDown(infobars::InfoBarManager* manager) override;
49 50
51 // Adds the info bar to the tab if it is missing.
52 void MaybeAddInfoBar(content::WebContents* web_contents);
53
50 std::unique_ptr<ConfirmInfoBarDelegate> delegate_; 54 std::unique_ptr<ConfirmInfoBarDelegate> delegate_;
51 std::map<infobars::InfoBarManager*, DelegateProxy*> proxies_; 55 std::map<infobars::InfoBarManager*, DelegateProxy*> proxies_;
52 BrowserTabStripTracker browser_tab_strip_tracker_; 56 BrowserTabStripTracker browser_tab_strip_tracker_;
53 57
54 base::WeakPtrFactory<GlobalConfirmInfoBar> weak_factory_; 58 base::WeakPtrFactory<GlobalConfirmInfoBar> weak_factory_;
55 59
56 DISALLOW_COPY_AND_ASSIGN(GlobalConfirmInfoBar); 60 DISALLOW_COPY_AND_ASSIGN(GlobalConfirmInfoBar);
57 }; 61 };
58 62
59 #endif // CHROME_BROWSER_DEVTOOLS_GLOBAL_CONFIRM_INFO_BAR_H_ 63 #endif // CHROME_BROWSER_DEVTOOLS_GLOBAL_CONFIRM_INFO_BAR_H_
OLDNEW
« no previous file with comments | « chrome/browser/devtools/devtools_auto_opener.cc ('k') | chrome/browser/devtools/global_confirm_info_bar.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698