| OLD | NEW |
| 1 // Copyright 2012 The Chromium Authors. All rights reserved. | 1 // Copyright 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_TOOLBAR_RECENT_TABS_SUB_MENU_MODEL_H_ | 5 #ifndef CHROME_BROWSER_UI_TOOLBAR_RECENT_TABS_SUB_MENU_MODEL_H_ |
| 6 #define CHROME_BROWSER_UI_TOOLBAR_RECENT_TABS_SUB_MENU_MODEL_H_ | 6 #define CHROME_BROWSER_UI_TOOLBAR_RECENT_TABS_SUB_MENU_MODEL_H_ |
| 7 | 7 |
| 8 #include <set> | 8 #include <set> |
| 9 | 9 |
| 10 #include "base/memory/weak_ptr.h" | 10 #include "base/memory/weak_ptr.h" |
| (...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 45 virtual bool IsCommandIdChecked(int command_id) const OVERRIDE; | 45 virtual bool IsCommandIdChecked(int command_id) const OVERRIDE; |
| 46 virtual bool IsCommandIdEnabled(int command_id) const OVERRIDE; | 46 virtual bool IsCommandIdEnabled(int command_id) const OVERRIDE; |
| 47 virtual bool GetAcceleratorForCommandId( | 47 virtual bool GetAcceleratorForCommandId( |
| 48 int command_id, | 48 int command_id, |
| 49 ui::Accelerator* accelerator) OVERRIDE; | 49 ui::Accelerator* accelerator) OVERRIDE; |
| 50 virtual bool IsItemForCommandIdDynamic(int command_id) const OVERRIDE; | 50 virtual bool IsItemForCommandIdDynamic(int command_id) const OVERRIDE; |
| 51 virtual string16 GetLabelForCommandId(int command_id) const OVERRIDE; | 51 virtual string16 GetLabelForCommandId(int command_id) const OVERRIDE; |
| 52 virtual void ExecuteCommand(int command_id) OVERRIDE; | 52 virtual void ExecuteCommand(int command_id) OVERRIDE; |
| 53 virtual void ExecuteCommand(int command_id, int event_flags) OVERRIDE; | 53 virtual void ExecuteCommand(int command_id, int event_flags) OVERRIDE; |
| 54 | 54 |
| 55 int GetMaxWidthForItemAtIndex(int item_index) const; |
| 56 |
| 55 private: | 57 private: |
| 56 struct NavigationItem; | 58 struct NavigationItem; |
| 57 typedef std::vector<NavigationItem> NavigationItems; | 59 typedef std::vector<NavigationItem> NavigationItems; |
| 58 | 60 |
| 59 // Build the menu items by populating the model. | 61 // Build the menu items by populating the model. |
| 60 void Build(); | 62 void Build(); |
| 61 void BuildLastClosed(); | 63 void BuildLastClosed(); |
| 62 void BuildDevices(); | 64 void BuildDevices(); |
| 63 void BuildForeignTabItem( | 65 void BuildForeignTabItem( |
| 64 const std::string& session_tag, | 66 const std::string& session_tag, |
| (...skipping 24 matching lines...) Expand all Loading... |
| 89 gfx::Image default_favicon_; | 91 gfx::Image default_favicon_; |
| 90 | 92 |
| 91 CancelableRequestConsumerTSimple<int> favicon_consumer_; | 93 CancelableRequestConsumerTSimple<int> favicon_consumer_; |
| 92 | 94 |
| 93 base::WeakPtrFactory<RecentTabsSubMenuModel> weak_ptr_factory_; | 95 base::WeakPtrFactory<RecentTabsSubMenuModel> weak_ptr_factory_; |
| 94 | 96 |
| 95 DISALLOW_COPY_AND_ASSIGN(RecentTabsSubMenuModel); | 97 DISALLOW_COPY_AND_ASSIGN(RecentTabsSubMenuModel); |
| 96 }; | 98 }; |
| 97 | 99 |
| 98 #endif // CHROME_BROWSER_UI_TOOLBAR_RECENT_TABS_SUB_MENU_MODEL_H_ | 100 #endif // CHROME_BROWSER_UI_TOOLBAR_RECENT_TABS_SUB_MENU_MODEL_H_ |
| OLD | NEW |