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

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

Issue 2335203003: Add metrics to keep track of the tab activate/deactivate cycle (Closed)
Patch Set: Addressed comments 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
50 std::unique_ptr<ConfirmInfoBarDelegate> delegate_; 51 std::unique_ptr<ConfirmInfoBarDelegate> delegate_;
51 std::map<infobars::InfoBarManager*, DelegateProxy*> proxies_; 52 std::map<infobars::InfoBarManager*, DelegateProxy*> proxies_;
52 BrowserTabStripTracker browser_tab_strip_tracker_; 53 BrowserTabStripTracker browser_tab_strip_tracker_;
53 54
54 base::WeakPtrFactory<GlobalConfirmInfoBar> weak_factory_; 55 base::WeakPtrFactory<GlobalConfirmInfoBar> weak_factory_;
55 56
56 DISALLOW_COPY_AND_ASSIGN(GlobalConfirmInfoBar); 57 DISALLOW_COPY_AND_ASSIGN(GlobalConfirmInfoBar);
57 }; 58 };
58 59
59 #endif // CHROME_BROWSER_DEVTOOLS_GLOBAL_CONFIRM_INFO_BAR_H_ 60 #endif // CHROME_BROWSER_DEVTOOLS_GLOBAL_CONFIRM_INFO_BAR_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698