OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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_UI_ASH_LAUNCHER_BROWSER_STATUS_MONITOR_H_ | 5 #ifndef CHROME_BROWSER_UI_ASH_LAUNCHER_BROWSER_STATUS_MONITOR_H_ |
6 #define CHROME_BROWSER_UI_ASH_LAUNCHER_BROWSER_STATUS_MONITOR_H_ | 6 #define CHROME_BROWSER_UI_ASH_LAUNCHER_BROWSER_STATUS_MONITOR_H_ |
7 | 7 |
8 #include <stdint.h> | 8 #include <stdint.h> |
9 | 9 |
10 #include <map> | 10 #include <map> |
(...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
91 | 91 |
92 // Remove a V1 application from the shelf. This can get overwritten for multi | 92 // Remove a V1 application from the shelf. This can get overwritten for multi |
93 // profile implementations. | 93 // profile implementations. |
94 virtual void RemoveV1AppFromShelf(Browser* browser); | 94 virtual void RemoveV1AppFromShelf(Browser* browser); |
95 | 95 |
96 // Check if V1 application is currently in the shelf. | 96 // Check if V1 application is currently in the shelf. |
97 bool IsV1AppInShelf(Browser* browser); | 97 bool IsV1AppInShelf(Browser* browser); |
98 | 98 |
99 private: | 99 private: |
100 class LocalWebContentsObserver; | 100 class LocalWebContentsObserver; |
101 class SettingsWindowObserver; | |
102 | 101 |
103 // Create LocalWebContentsObserver for |contents|. | 102 // Create LocalWebContentsObserver for |contents|. |
104 void AddWebContentsObserver(content::WebContents* contents); | 103 void AddWebContentsObserver(content::WebContents* contents); |
105 | 104 |
106 // Remove LocalWebContentsObserver for |contents|. | 105 // Remove LocalWebContentsObserver for |contents|. |
107 void RemoveWebContentsObserver(content::WebContents* contents); | 106 void RemoveWebContentsObserver(content::WebContents* contents); |
108 | 107 |
109 // Returns the ShelfID for |contents|. | 108 // Returns the ShelfID for |contents|. |
110 ash::ShelfID GetShelfIDForWebContents(content::WebContents* contents); | 109 ash::ShelfID GetShelfIDForWebContents(content::WebContents* contents); |
111 | 110 |
112 // Sets the shelf id for browsers represented by the browser shortcut item. | 111 // Sets the shelf id for browsers represented by the browser shortcut item. |
113 void SetShelfIDForBrowserWindowContents(Browser* browser, | 112 void SetShelfIDForBrowserWindowContents(Browser* browser, |
114 content::WebContents* web_contents); | 113 content::WebContents* web_contents); |
115 | 114 |
116 ChromeLauncherController* launcher_controller_; | 115 ChromeLauncherController* launcher_controller_; |
117 | 116 |
118 std::map<Browser*, std::string> browser_to_app_id_map_; | 117 std::map<Browser*, std::string> browser_to_app_id_map_; |
119 std::map<content::WebContents*, std::unique_ptr<LocalWebContentsObserver>> | 118 std::map<content::WebContents*, std::unique_ptr<LocalWebContentsObserver>> |
120 webcontents_to_observer_map_; | 119 webcontents_to_observer_map_; |
121 std::unique_ptr<SettingsWindowObserver> settings_window_observer_; | |
122 | 120 |
123 BrowserTabStripTracker browser_tab_strip_tracker_; | 121 BrowserTabStripTracker browser_tab_strip_tracker_; |
124 | 122 |
125 DISALLOW_COPY_AND_ASSIGN(BrowserStatusMonitor); | 123 DISALLOW_COPY_AND_ASSIGN(BrowserStatusMonitor); |
126 }; | 124 }; |
127 | 125 |
128 #endif // CHROME_BROWSER_UI_ASH_LAUNCHER_BROWSER_STATUS_MONITOR_H_ | 126 #endif // CHROME_BROWSER_UI_ASH_LAUNCHER_BROWSER_STATUS_MONITOR_H_ |
OLD | NEW |