| 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_TOOLBAR_ACTION_VIEW_H_ | 5 #ifndef CHROME_BROWSER_UI_VIEWS_TOOLBAR_TOOLBAR_ACTION_VIEW_H_ |
| 6 #define CHROME_BROWSER_UI_VIEWS_TOOLBAR_TOOLBAR_ACTION_VIEW_H_ | 6 #define CHROME_BROWSER_UI_VIEWS_TOOLBAR_TOOLBAR_ACTION_VIEW_H_ |
| 7 | 7 |
| 8 #include "base/callback.h" | 8 #include "base/callback.h" |
| 9 #include "chrome/browser/ui/views/toolbar/toolbar_action_view_delegate_views.h" | 9 #include "chrome/browser/ui/views/toolbar/toolbar_action_view_delegate_views.h" |
| 10 #include "content/public/browser/notification_observer.h" | 10 #include "content/public/browser/notification_observer.h" |
| (...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 111 // The toolbar action opening the menu will be passed in. | 111 // The toolbar action opening the menu will be passed in. |
| 112 static void set_context_menu_callback_for_testing( | 112 static void set_context_menu_callback_for_testing( |
| 113 ContextMenuCallback* callback); | 113 ContextMenuCallback* callback); |
| 114 | 114 |
| 115 views::MenuItemView* menu_for_testing() { return menu_; } | 115 views::MenuItemView* menu_for_testing() { return menu_; } |
| 116 | 116 |
| 117 private: | 117 private: |
| 118 // views::MenuButton: | 118 // views::MenuButton: |
| 119 gfx::Size GetPreferredSize() const override; | 119 gfx::Size GetPreferredSize() const override; |
| 120 bool OnMousePressed(const ui::MouseEvent& event) override; | 120 bool OnMousePressed(const ui::MouseEvent& event) override; |
| 121 void OnMouseCaptureLost() override; |
| 121 void OnGestureEvent(ui::GestureEvent* event) override; | 122 void OnGestureEvent(ui::GestureEvent* event) override; |
| 122 void OnDragDone() override; | 123 void OnDragDone() override; |
| 123 void ViewHierarchyChanged( | 124 void ViewHierarchyChanged( |
| 124 const ViewHierarchyChangedDetails& details) override; | 125 const ViewHierarchyChangedDetails& details) override; |
| 125 | 126 |
| 126 // ToolbarActionViewDelegateViews: | 127 // ToolbarActionViewDelegateViews: |
| 127 views::View* GetAsView() override; | 128 views::View* GetAsView() override; |
| 128 views::FocusManager* GetFocusManagerForAccelerator() override; | 129 views::FocusManager* GetFocusManagerForAccelerator() override; |
| 129 views::View* GetReferenceViewForPopup() override; | 130 views::View* GetReferenceViewForPopup() override; |
| 130 bool IsMenuRunning() const override; | 131 bool IsMenuRunning() const override; |
| (...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 184 content::NotificationRegistrar registrar_; | 185 content::NotificationRegistrar registrar_; |
| 185 | 186 |
| 186 scoped_ptr<views::InkDropDelegate> ink_drop_delegate_; | 187 scoped_ptr<views::InkDropDelegate> ink_drop_delegate_; |
| 187 | 188 |
| 188 base::WeakPtrFactory<ToolbarActionView> weak_factory_; | 189 base::WeakPtrFactory<ToolbarActionView> weak_factory_; |
| 189 | 190 |
| 190 DISALLOW_COPY_AND_ASSIGN(ToolbarActionView); | 191 DISALLOW_COPY_AND_ASSIGN(ToolbarActionView); |
| 191 }; | 192 }; |
| 192 | 193 |
| 193 #endif // CHROME_BROWSER_UI_VIEWS_TOOLBAR_TOOLBAR_ACTION_VIEW_H_ | 194 #endif // CHROME_BROWSER_UI_VIEWS_TOOLBAR_TOOLBAR_ACTION_VIEW_H_ |
| OLD | NEW |