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_BROWSER_ACTION_VIEW_H_ | 5 #ifndef CHROME_BROWSER_UI_VIEWS_TOOLBAR_BROWSER_ACTION_VIEW_H_ |
6 #define CHROME_BROWSER_UI_VIEWS_TOOLBAR_BROWSER_ACTION_VIEW_H_ | 6 #define CHROME_BROWSER_UI_VIEWS_TOOLBAR_BROWSER_ACTION_VIEW_H_ |
7 | 7 |
8 #include "chrome/browser/ui/views/toolbar/toolbar_action_view_delegate.h" | 8 #include "chrome/browser/ui/views/toolbar/toolbar_action_view_delegate.h" |
9 #include "content/public/browser/notification_observer.h" | 9 #include "content/public/browser/notification_observer.h" |
10 #include "content/public/browser/notification_registrar.h" | 10 #include "content/public/browser/notification_registrar.h" |
(...skipping 24 matching lines...) Expand all Loading... | |
35 class BrowserActionView : public views::MenuButton, | 35 class BrowserActionView : public views::MenuButton, |
36 public ToolbarActionViewDelegate, | 36 public ToolbarActionViewDelegate, |
37 public views::ButtonListener, | 37 public views::ButtonListener, |
38 public content::NotificationObserver { | 38 public content::NotificationObserver { |
39 public: | 39 public: |
40 // Need DragController here because BrowserActionView could be | 40 // Need DragController here because BrowserActionView could be |
41 // dragged/dropped. | 41 // dragged/dropped. |
42 class Delegate : public views::DragController { | 42 class Delegate : public views::DragController { |
43 public: | 43 public: |
44 // Returns the current web contents. | 44 // Returns the current web contents. |
45 virtual content::WebContents* GetCurrentWebContents() = 0; | 45 virtual content::WebContents* GetCurrentWebContents() const = 0; |
Peter Kasting
2014/10/30 22:05:59
Const functions should not return non-const pointe
Devlin
2014/10/31 17:44:09
I thought this only applied to direct data members
Peter Kasting
2014/10/31 19:01:07
There's a whole long physical/logical constness de
| |
46 | 46 |
47 // Whether the container for this button is shown inside a menu. | 47 // Whether the container for this button is shown inside a menu. |
48 virtual bool ShownInsideMenu() const = 0; | 48 virtual bool ShownInsideMenu() const = 0; |
49 | 49 |
50 // Notifies that a drag completed. Note this will only happen if the view | 50 // Notifies that a drag completed. Note this will only happen if the view |
51 // wasn't removed during the drag-and-drop process (i.e., not when there | 51 // wasn't removed during the drag-and-drop process (i.e., not when there |
52 // was a move in the browser actions, since we re-create the views each | 52 // was a move in the browser actions, since we re-create the views each |
53 // time we re-order the browser actions). | 53 // time we re-order the browser actions). |
54 virtual void OnBrowserActionViewDragDone() = 0; | 54 virtual void OnBrowserActionViewDragDone() = 0; |
55 | 55 |
(...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
154 | 154 |
155 // Used to make sure we only register the command once. | 155 // Used to make sure we only register the command once. |
156 bool called_register_command_; | 156 bool called_register_command_; |
157 | 157 |
158 content::NotificationRegistrar registrar_; | 158 content::NotificationRegistrar registrar_; |
159 | 159 |
160 DISALLOW_COPY_AND_ASSIGN(BrowserActionView); | 160 DISALLOW_COPY_AND_ASSIGN(BrowserActionView); |
161 }; | 161 }; |
162 | 162 |
163 #endif // CHROME_BROWSER_UI_VIEWS_TOOLBAR_BROWSER_ACTION_VIEW_H_ | 163 #endif // CHROME_BROWSER_UI_VIEWS_TOOLBAR_BROWSER_ACTION_VIEW_H_ |
OLD | NEW |