| 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 protected: | 92 protected: |
| 93 // Add a V1 application to the shelf. This can get overwritten for multi | 93 // Add a V1 application to the shelf. This can get overwritten for multi |
| 94 // profile implementations. | 94 // profile implementations. |
| 95 virtual void AddV1AppToShelf(Browser* browser); | 95 virtual void AddV1AppToShelf(Browser* browser); |
| 96 | 96 |
| 97 // Remove a V1 application from the shelf. This can get overwritten for multi | 97 // Remove a V1 application from the shelf. This can get overwritten for multi |
| 98 // profile implementations. | 98 // profile implementations. |
| 99 virtual void RemoveV1AppFromShelf(Browser* browser); | 99 virtual void RemoveV1AppFromShelf(Browser* browser); |
| 100 | 100 |
| 101 // Check if V1 application is currently in the shelf. | 101 // Check if a V1 application is currently in the shelf by browser or app id. |
| 102 bool IsV1AppInShelf(Browser* browser); | 102 bool IsV1AppInShelf(Browser* browser); |
| 103 bool IsV1AppInShelfWithAppId(const std::string& app_id); |
| 103 | 104 |
| 104 private: | 105 private: |
| 105 class LocalWebContentsObserver; | 106 class LocalWebContentsObserver; |
| 106 | 107 |
| 107 // Create LocalWebContentsObserver for |contents|. | 108 // Create LocalWebContentsObserver for |contents|. |
| 108 void AddWebContentsObserver(content::WebContents* contents); | 109 void AddWebContentsObserver(content::WebContents* contents); |
| 109 | 110 |
| 110 // Remove LocalWebContentsObserver for |contents|. | 111 // Remove LocalWebContentsObserver for |contents|. |
| 111 void RemoveWebContentsObserver(content::WebContents* contents); | 112 void RemoveWebContentsObserver(content::WebContents* contents); |
| 112 | 113 |
| (...skipping 10 matching lines...) Expand all Loading... |
| 123 std::map<content::WebContents*, std::unique_ptr<LocalWebContentsObserver>> | 124 std::map<content::WebContents*, std::unique_ptr<LocalWebContentsObserver>> |
| 124 webcontents_to_observer_map_; | 125 webcontents_to_observer_map_; |
| 125 | 126 |
| 126 BrowserTabStripTracker browser_tab_strip_tracker_; | 127 BrowserTabStripTracker browser_tab_strip_tracker_; |
| 127 bool initialized_ = false; | 128 bool initialized_ = false; |
| 128 | 129 |
| 129 DISALLOW_COPY_AND_ASSIGN(BrowserStatusMonitor); | 130 DISALLOW_COPY_AND_ASSIGN(BrowserStatusMonitor); |
| 130 }; | 131 }; |
| 131 | 132 |
| 132 #endif // CHROME_BROWSER_UI_ASH_LAUNCHER_BROWSER_STATUS_MONITOR_H_ | 133 #endif // CHROME_BROWSER_UI_ASH_LAUNCHER_BROWSER_STATUS_MONITOR_H_ |
| OLD | NEW |