| OLD | NEW |
| 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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_WRENCH_MENU_MODEL_H_ | 5 #ifndef CHROME_BROWSER_WRENCH_MENU_MODEL_H_ |
| 6 #define CHROME_BROWSER_WRENCH_MENU_MODEL_H_ | 6 #define CHROME_BROWSER_WRENCH_MENU_MODEL_H_ |
| 7 | 7 |
| 8 #include <set> | 8 #include <set> |
| 9 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| (...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 71 bool user_gesture); | 71 bool user_gesture); |
| 72 virtual void TabReplacedAt(TabContents* old_contents, | 72 virtual void TabReplacedAt(TabContents* old_contents, |
| 73 TabContents* new_contents, int index); | 73 TabContents* new_contents, int index); |
| 74 virtual void TabStripModelDeleted(); | 74 virtual void TabStripModelDeleted(); |
| 75 | 75 |
| 76 // Overridden from NotificationObserver: | 76 // Overridden from NotificationObserver: |
| 77 virtual void Observe(NotificationType type, | 77 virtual void Observe(NotificationType type, |
| 78 const NotificationSource& source, | 78 const NotificationSource& source, |
| 79 const NotificationDetails& details); | 79 const NotificationDetails& details); |
| 80 | 80 |
| 81 // Getters. |
| 82 Browser* browser() const { return browser_; } |
| 83 |
| 81 private: | 84 private: |
| 82 // Testing constructor used for mocking. | 85 // Testing constructor used for mocking. |
| 83 friend class ::MockWrenchMenuModel; | 86 friend class ::MockWrenchMenuModel; |
| 84 WrenchMenuModel() : menus::SimpleMenuModel(NULL) {} | 87 WrenchMenuModel() : menus::SimpleMenuModel(NULL) {} |
| 85 | 88 |
| 86 void Build(); | 89 void Build(); |
| 87 | 90 |
| 88 // Adds custom items to the menu. Deprecated in favor of a cross platform | 91 // Adds custom items to the menu. Deprecated in favor of a cross platform |
| 89 // model for button items. | 92 // model for button items. |
| 90 void CreateCutCopyPaste(); | 93 void CreateCutCopyPaste(); |
| (...skipping 21 matching lines...) Expand all Loading... |
| 112 | 115 |
| 113 Browser* browser_; // weak | 116 Browser* browser_; // weak |
| 114 TabStripModel* tabstrip_model_; // weak | 117 TabStripModel* tabstrip_model_; // weak |
| 115 | 118 |
| 116 NotificationRegistrar registrar_; | 119 NotificationRegistrar registrar_; |
| 117 | 120 |
| 118 DISALLOW_COPY_AND_ASSIGN(WrenchMenuModel); | 121 DISALLOW_COPY_AND_ASSIGN(WrenchMenuModel); |
| 119 }; | 122 }; |
| 120 | 123 |
| 121 #endif // CHROME_BROWSER_WRENCH_MENU_MODEL_H_ | 124 #endif // CHROME_BROWSER_WRENCH_MENU_MODEL_H_ |
| OLD | NEW |