| 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_VIEWS_TOOLBAR_APP_MENU_BUTTON_H_ | 5 #ifndef CHROME_BROWSER_UI_VIEWS_TOOLBAR_APP_MENU_BUTTON_H_ |
| 6 #define CHROME_BROWSER_UI_VIEWS_TOOLBAR_APP_MENU_BUTTON_H_ | 6 #define CHROME_BROWSER_UI_VIEWS_TOOLBAR_APP_MENU_BUTTON_H_ |
| 7 | 7 |
| 8 #include "base/macros.h" | 8 #include "base/macros.h" |
| 9 #include "base/memory/scoped_ptr.h" | 9 #include "base/memory/scoped_ptr.h" |
| 10 #include "base/memory/weak_ptr.h" | 10 #include "base/memory/weak_ptr.h" |
| (...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 102 | 102 |
| 103 // Listeners to call when the menu opens. | 103 // Listeners to call when the menu opens. |
| 104 base::ObserverList<views::MenuListener> menu_listeners_; | 104 base::ObserverList<views::MenuListener> menu_listeners_; |
| 105 | 105 |
| 106 // App model and menu. | 106 // App model and menu. |
| 107 // Note that the menu should be destroyed before the model it uses, so the | 107 // Note that the menu should be destroyed before the model it uses, so the |
| 108 // menu should be listed later. | 108 // menu should be listed later. |
| 109 scoped_ptr<AppMenuModel> menu_model_; | 109 scoped_ptr<AppMenuModel> menu_model_; |
| 110 scoped_ptr<AppMenu> menu_; | 110 scoped_ptr<AppMenu> menu_; |
| 111 | 111 |
| 112 // Used by ShowMenu() to detect when |this| has been deleted; see comments | |
| 113 // there. | |
| 114 bool* destroyed_; | |
| 115 | 112 |
| 116 // Any trailing margin to be applied. Used when the browser is in | 113 // Any trailing margin to be applied. Used when the browser is in |
| 117 // a maximized state to extend to the full window width. | 114 // a maximized state to extend to the full window width. |
| 118 int margin_trailing_; | 115 int margin_trailing_; |
| 119 | 116 |
| 120 // Controls the visual feedback for the button state. | 117 // Controls the visual feedback for the button state. |
| 121 scoped_ptr<views::InkDropDelegate> ink_drop_delegate_; | 118 scoped_ptr<views::InkDropDelegate> ink_drop_delegate_; |
| 122 | 119 |
| 123 // Used to spawn weak pointers for delayed tasks to open the overflow menu. | 120 // Used to spawn weak pointers for delayed tasks to open the overflow menu. |
| 124 base::WeakPtrFactory<AppMenuButton> weak_factory_; | 121 base::WeakPtrFactory<AppMenuButton> weak_factory_; |
| 125 | 122 |
| 126 DISALLOW_COPY_AND_ASSIGN(AppMenuButton); | 123 DISALLOW_COPY_AND_ASSIGN(AppMenuButton); |
| 127 }; | 124 }; |
| 128 | 125 |
| 129 #endif // CHROME_BROWSER_UI_VIEWS_TOOLBAR_APP_MENU_BUTTON_H_ | 126 #endif // CHROME_BROWSER_UI_VIEWS_TOOLBAR_APP_MENU_BUTTON_H_ |
| OLD | NEW |