| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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_VIEWS_TABS_BROWSER_TAB_STRIP_CONTROLLER_H_ | 5 #ifndef CHROME_BROWSER_UI_VIEWS_TABS_BROWSER_TAB_STRIP_CONTROLLER_H_ |
| 6 #define CHROME_BROWSER_UI_VIEWS_TABS_BROWSER_TAB_STRIP_CONTROLLER_H_ | 6 #define CHROME_BROWSER_UI_VIEWS_TABS_BROWSER_TAB_STRIP_CONTROLLER_H_ |
| 7 | 7 |
| 8 #include <memory> | 8 #include <memory> |
| 9 | 9 |
| 10 #include "base/compiler_specific.h" | 10 #include "base/compiler_specific.h" |
| (...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 94 void TabReplacedAt(TabStripModel* tab_strip_model, | 94 void TabReplacedAt(TabStripModel* tab_strip_model, |
| 95 content::WebContents* old_contents, | 95 content::WebContents* old_contents, |
| 96 content::WebContents* new_contents, | 96 content::WebContents* new_contents, |
| 97 int model_index) override; | 97 int model_index) override; |
| 98 void TabPinnedStateChanged(TabStripModel* tab_strip_model, | 98 void TabPinnedStateChanged(TabStripModel* tab_strip_model, |
| 99 content::WebContents* contents, | 99 content::WebContents* contents, |
| 100 int model_index) override; | 100 int model_index) override; |
| 101 void TabBlockedStateChanged(content::WebContents* contents, | 101 void TabBlockedStateChanged(content::WebContents* contents, |
| 102 int model_index) override; | 102 int model_index) override; |
| 103 | 103 |
| 104 const Browser* browser() const { return browser_; } |
| 105 |
| 104 protected: | 106 protected: |
| 105 // The context in which SetTabRendererDataFromModel is being called. | 107 // The context in which SetTabRendererDataFromModel is being called. |
| 106 enum TabStatus { | 108 enum TabStatus { |
| 107 NEW_TAB, | 109 NEW_TAB, |
| 108 EXISTING_TAB | 110 EXISTING_TAB |
| 109 }; | 111 }; |
| 110 | 112 |
| 111 // Sets the TabRendererData from the TabStripModel. | 113 // Sets the TabRendererData from the TabStripModel. |
| 112 virtual void SetTabRendererDataFromModel(content::WebContents* contents, | 114 virtual void SetTabRendererDataFromModel(content::WebContents* contents, |
| 113 int model_index, | 115 int model_index, |
| 114 TabRendererData* data, | 116 TabRendererData* data, |
| 115 TabStatus tab_status); | 117 TabStatus tab_status); |
| 116 | 118 |
| 117 Profile* profile() const { return model_->profile(); } | 119 Profile* profile() const { return model_->profile(); } |
| 118 | 120 |
| 119 const TabStrip* tabstrip() const { return tabstrip_; } | 121 const TabStrip* tabstrip() const { return tabstrip_; } |
| 120 | 122 |
| 121 const Browser* browser() const { return browser_; } | |
| 122 | |
| 123 private: | 123 private: |
| 124 class TabContextMenuContents; | 124 class TabContextMenuContents; |
| 125 | 125 |
| 126 // Invokes tabstrip_->SetTabData. | 126 // Invokes tabstrip_->SetTabData. |
| 127 void SetTabDataAt(content::WebContents* web_contents, int model_index); | 127 void SetTabDataAt(content::WebContents* web_contents, int model_index); |
| 128 | 128 |
| 129 void StartHighlightTabsForCommand( | 129 void StartHighlightTabsForCommand( |
| 130 TabStripModel::ContextMenuCommand command_id, | 130 TabStripModel::ContextMenuCommand command_id, |
| 131 Tab* tab); | 131 Tab* tab); |
| 132 void StopHighlightTabsForCommand( | 132 void StopHighlightTabsForCommand( |
| (...skipping 30 matching lines...) Expand all Loading... |
| 163 std::unique_ptr<ImmersiveRevealedLock> immersive_reveal_lock_; | 163 std::unique_ptr<ImmersiveRevealedLock> immersive_reveal_lock_; |
| 164 | 164 |
| 165 PrefChangeRegistrar local_pref_registrar_; | 165 PrefChangeRegistrar local_pref_registrar_; |
| 166 | 166 |
| 167 base::WeakPtrFactory<BrowserTabStripController> weak_ptr_factory_; | 167 base::WeakPtrFactory<BrowserTabStripController> weak_ptr_factory_; |
| 168 | 168 |
| 169 DISALLOW_COPY_AND_ASSIGN(BrowserTabStripController); | 169 DISALLOW_COPY_AND_ASSIGN(BrowserTabStripController); |
| 170 }; | 170 }; |
| 171 | 171 |
| 172 #endif // CHROME_BROWSER_UI_VIEWS_TABS_BROWSER_TAB_STRIP_CONTROLLER_H_ | 172 #endif // CHROME_BROWSER_UI_VIEWS_TABS_BROWSER_TAB_STRIP_CONTROLLER_H_ |
| OLD | NEW |