summaryrefslogtreecommitdiffstats
path: root/chrome/browser/ui/views/browser_actions_container.h
diff options
context:
space:
mode:
authormsw@chromium.org <msw@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-03-16 20:16:43 +0000
committermsw@chromium.org <msw@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-03-16 20:16:43 +0000
commit72279de2022a9c5e862963baf000b54ec559d8ed (patch)
tree14fbea01a08a9c7276ecb1981b95988ae2de0143 /chrome/browser/ui/views/browser_actions_container.h
parent9e7b3f08a3e65b88fbb91045450b55582dd745b6 (diff)
downloadchromium_src-72279de2022a9c5e862963baf000b54ec559d8ed.zip
chromium_src-72279de2022a9c5e862963baf000b54ec559d8ed.tar.gz
chromium_src-72279de2022a9c5e862963baf000b54ec559d8ed.tar.bz2
Reorder some views::View overrides & other functions.
Follow base class ordering and access specifiers. Add OVERRIDE keyword where applicable. Define BaseTab::set_animation_container out of line, update includes. Limit RenderWidgetHostViewViews::OnTouchEvent to TOUCH_UI. Make RenderWidgetHostViewViews::GetCursorForPoint a virtual override. Review URL: http://codereview.chromium.org/6673070 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@78416 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/ui/views/browser_actions_container.h')
-rw-r--r--chrome/browser/ui/views/browser_actions_container.h78
1 files changed, 41 insertions, 37 deletions
diff --git a/chrome/browser/ui/views/browser_actions_container.h b/chrome/browser/ui/views/browser_actions_container.h
index d2e1853..2eb831f 100644
--- a/chrome/browser/ui/views/browser_actions_container.h
+++ b/chrome/browser/ui/views/browser_actions_container.h
@@ -74,10 +74,9 @@ class BrowserActionButton : public views::MenuButton,
// Returns the default icon, if any.
const SkBitmap& default_icon() const { return default_icon_; }
- // Overridden from views::View:
- virtual void ViewHierarchyChanged(bool is_add,
- View* parent,
- View* child) OVERRIDE;
+ // Does this button's action have a popup?
+ virtual bool IsPopup();
+ virtual GURL GetPopupUrl();
// Overridden from views::ButtonListener:
virtual void ButtonPressed(views::Button* sender,
@@ -102,20 +101,22 @@ class BrowserActionButton : public views::MenuButton,
virtual bool OnMousePressed(const views::MouseEvent& event) OVERRIDE;
virtual void OnMouseReleased(const views::MouseEvent& event,
bool canceled) OVERRIDE;
- virtual bool OnKeyReleased(const views::KeyEvent& event) OVERRIDE;
virtual void OnMouseExited(const views::MouseEvent& event) OVERRIDE;
+ virtual bool OnKeyReleased(const views::KeyEvent& event) OVERRIDE;
virtual void ShowContextMenu(const gfx::Point& p,
bool is_mouse_gesture) OVERRIDE;
- // Does this button's action have a popup?
- virtual bool IsPopup();
- virtual GURL GetPopupUrl();
-
// Notifications when to set button state to pushed/not pushed (for when the
// popup/context menu is hidden or shown by the container).
void SetButtonPushed();
void SetButtonNotPushed();
+ protected:
+ // Overridden from views::View:
+ virtual void ViewHierarchyChanged(bool is_add,
+ View* parent,
+ View* child) OVERRIDE;
+
private:
virtual ~BrowserActionButton();
@@ -168,15 +169,15 @@ class BrowserActionView : public views::View {
// returned object.
gfx::Canvas* GetIconWithBadge();
- // Accessibility accessors, overridden from View.
+ // Overridden from views::View:
+ virtual void Layout() OVERRIDE;
virtual void GetAccessibleState(ui::AccessibleViewState* state) OVERRIDE;
- private:
- virtual void Layout();
-
- // Override PaintChildren so that we can paint the badge on top of children.
- virtual void PaintChildren(gfx::Canvas* canvas);
+ protected:
+ // Overridden from views::View to paint the badge on top of children.
+ virtual void PaintChildren(gfx::Canvas* canvas) OVERRIDE;
+ private:
// The container for this view.
BrowserActionsContainer* panel_;
@@ -322,25 +323,20 @@ class BrowserActionsContainer
bool inspect_with_devtools);
// Overridden from views::View:
- virtual gfx::Size GetPreferredSize();
- virtual void Layout();
- virtual void OnPaint(gfx::Canvas* canvas);
- virtual void ViewHierarchyChanged(bool is_add,
- views::View* parent,
- views::View* child);
- virtual bool GetDropFormats(
- int* formats, std::set<ui::OSExchangeData::CustomFormat>* custom_formats);
- virtual bool AreDropTypesRequired();
- virtual bool CanDrop(const ui::OSExchangeData& data);
- virtual void OnDragEntered(const views::DropTargetEvent& event);
- virtual int OnDragUpdated(const views::DropTargetEvent& event);
- virtual void OnDragExited();
- virtual int OnPerformDrop(const views::DropTargetEvent& event);
- virtual void OnThemeChanged();
+ virtual gfx::Size GetPreferredSize() OVERRIDE;
+ virtual void Layout() OVERRIDE;
+ virtual bool GetDropFormats(int* formats,
+ std::set<ui::OSExchangeData::CustomFormat>* custom_formats) OVERRIDE;
+ virtual bool AreDropTypesRequired() OVERRIDE;
+ virtual bool CanDrop(const ui::OSExchangeData& data) OVERRIDE;
+ virtual void OnDragEntered(const views::DropTargetEvent& event) OVERRIDE;
+ virtual int OnDragUpdated(const views::DropTargetEvent& event) OVERRIDE;
+ virtual void OnDragExited() OVERRIDE;
+ virtual int OnPerformDrop(const views::DropTargetEvent& event) OVERRIDE;
virtual void GetAccessibleState(ui::AccessibleViewState* state) OVERRIDE;
// Overridden from views::ViewMenuDelegate:
- virtual void RunMenu(View* source, const gfx::Point& pt);
+ virtual void RunMenu(View* source, const gfx::Point& pt) OVERRIDE;
// Overridden from views::DragController:
virtual void WriteDragDataForView(View* sender,
@@ -353,21 +349,21 @@ class BrowserActionsContainer
const gfx::Point& p) OVERRIDE;
// Overridden from ResizeArea::ResizeAreaDelegate:
- virtual void OnResize(int resize_amount, bool done_resizing);
+ virtual void OnResize(int resize_amount, bool done_resizing) OVERRIDE;
// Overridden from ui::AnimationDelegate:
- virtual void AnimationProgressed(const ui::Animation* animation);
- virtual void AnimationEnded(const ui::Animation* animation);
+ virtual void AnimationProgressed(const ui::Animation* animation) OVERRIDE;
+ virtual void AnimationEnded(const ui::Animation* animation) OVERRIDE;
// Overridden from BrowserActionOverflowMenuController::Observer:
virtual void NotifyMenuDeleted(
- BrowserActionOverflowMenuController* controller);
+ BrowserActionOverflowMenuController* controller) OVERRIDE;
// Overridden from ExtensionContextMenuModel::PopupDelegate
- virtual void InspectPopup(ExtensionAction* action);
+ virtual void InspectPopup(ExtensionAction* action) OVERRIDE;
// Overriden from ExtensionPopup::Delegate
- virtual void ExtensionPopupIsClosing(ExtensionPopup* popup);
+ virtual void ExtensionPopupIsClosing(ExtensionPopup* popup) OVERRIDE;
// Moves a browser action with |id| to |new_index|.
void MoveBrowserAction(const std::string& extension_id, size_t new_index);
@@ -391,6 +387,14 @@ class BrowserActionsContainer
// animates to open/closed status.
static bool disable_animations_during_testing_;
+ protected:
+ // Overridden from views::View:
+ virtual void ViewHierarchyChanged(bool is_add,
+ views::View* parent,
+ views::View* child) OVERRIDE;
+ virtual void OnPaint(gfx::Canvas* canvas) OVERRIDE;
+ virtual void OnThemeChanged() OVERRIDE;
+
private:
friend class BrowserActionView; // So it can access IconHeight().
friend class ShowFolderMenuTask;