diff options
author | sky@chromium.org <sky@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-03-15 14:19:30 +0000 |
---|---|---|
committer | sky@chromium.org <sky@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-03-15 14:19:30 +0000 |
commit | acc9c371d618e9a3c4c52c899423e20cb114c5b7 (patch) | |
tree | ad5c6ab5b24dabd44645a0724daf1fcb9a2b3473 /chrome | |
parent | d49c0e28bb2439746cbaf19c2bc84f796e6dc32f (diff) | |
download | chromium_src-acc9c371d618e9a3c4c52c899423e20cb114c5b7.zip chromium_src-acc9c371d618e9a3c4c52c899423e20cb114c5b7.tar.gz chromium_src-acc9c371d618e9a3c4c52c899423e20cb114c5b7.tar.bz2 |
Adds OVERRIDE to the appropriate places in
chrome/browser/ui/views/tabs.
BUG=none
TEST=none
R=ben@chromium.org
Review URL: http://codereview.chromium.org/6698007
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@78206 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome')
-rw-r--r-- | chrome/browser/ui/views/tabs/base_tab_strip.h | 41 | ||||
-rw-r--r-- | chrome/browser/ui/views/tabs/browser_tab_strip_controller.h | 59 | ||||
-rw-r--r-- | chrome/browser/ui/views/tabs/dragged_tab_controller.h | 32 | ||||
-rw-r--r-- | chrome/browser/ui/views/tabs/dragged_tab_view.h | 6 | ||||
-rw-r--r-- | chrome/browser/ui/views/tabs/native_view_photobooth.h | 1 | ||||
-rw-r--r-- | chrome/browser/ui/views/tabs/native_view_photobooth_gtk.h | 8 | ||||
-rw-r--r-- | chrome/browser/ui/views/tabs/native_view_photobooth_win.h | 7 | ||||
-rw-r--r-- | chrome/browser/ui/views/tabs/side_tab.h | 10 | ||||
-rw-r--r-- | chrome/browser/ui/views/tabs/side_tab_strip.h | 20 | ||||
-rw-r--r-- | chrome/browser/ui/views/tabs/tab_strip.h | 6 |
10 files changed, 101 insertions, 89 deletions
diff --git a/chrome/browser/ui/views/tabs/base_tab_strip.h b/chrome/browser/ui/views/tabs/base_tab_strip.h index eb27da5..58fabd5 100644 --- a/chrome/browser/ui/views/tabs/base_tab_strip.h +++ b/chrome/browser/ui/views/tabs/base_tab_strip.h @@ -115,32 +115,33 @@ class BaseTabStrip : public AbstractTabStripView, bool IsActiveDropTarget() const; // AbstractTabStripView implementation - virtual bool IsTabStripEditable() const; - virtual bool IsTabStripCloseable() const; - virtual void UpdateLoadingAnimations(); + virtual bool IsTabStripEditable() const OVERRIDE; + virtual bool IsTabStripCloseable() const OVERRIDE; + virtual void UpdateLoadingAnimations() OVERRIDE; // TabController overrides: - virtual void SelectTab(BaseTab* tab); - virtual void ExtendSelectionTo(BaseTab* tab); - virtual void ToggleSelected(BaseTab* tab); - virtual void CloseTab(BaseTab* tab); - virtual void ShowContextMenuForTab(BaseTab* tab, const gfx::Point& p); - virtual bool IsTabSelected(const BaseTab* tab) const; - virtual bool IsTabPinned(const BaseTab* tab) const; - virtual bool IsTabCloseable(const BaseTab* tab) const; + virtual void SelectTab(BaseTab* tab) OVERRIDE; + virtual void ExtendSelectionTo(BaseTab* tab) OVERRIDE; + virtual void ToggleSelected(BaseTab* tab) OVERRIDE; + virtual void CloseTab(BaseTab* tab) OVERRIDE; + virtual void ShowContextMenuForTab(BaseTab* tab, + const gfx::Point& p) OVERRIDE; + virtual bool IsTabSelected(const BaseTab* tab) const OVERRIDE; + virtual bool IsTabPinned(const BaseTab* tab) const OVERRIDE; + virtual bool IsTabCloseable(const BaseTab* tab) const OVERRIDE; virtual void MaybeStartDrag(BaseTab* tab, - const views::MouseEvent& event); - virtual void ContinueDrag(const views::MouseEvent& event); - virtual bool EndDrag(bool canceled); + const views::MouseEvent& event) OVERRIDE; + virtual void ContinueDrag(const views::MouseEvent& event) OVERRIDE; + virtual bool EndDrag(bool canceled) OVERRIDE; virtual BaseTab* GetTabAt(BaseTab* tab, - const gfx::Point& tab_in_tab_coordinates); + const gfx::Point& tab_in_tab_coordinates) OVERRIDE; // View overrides: - virtual void Layout(); + virtual void Layout() OVERRIDE; virtual bool GetDropFormats( int* formats, - std::set<OSExchangeData::CustomFormat>* custom_formats); - virtual bool CanDrop(const OSExchangeData& data); + std::set<OSExchangeData::CustomFormat>* custom_formats) OVERRIDE; + virtual bool CanDrop(const OSExchangeData& data) OVERRIDE; protected: // The Tabs we contain, and their last generated "good" bounds. @@ -150,9 +151,9 @@ class BaseTabStrip : public AbstractTabStripView, }; // View overrides. - virtual bool OnMouseDragged(const views::MouseEvent& event); + virtual bool OnMouseDragged(const views::MouseEvent& event) OVERRIDE; virtual void OnMouseReleased(const views::MouseEvent& event, - bool canceled); + bool canceled) OVERRIDE; // Creates and returns a new tab. The caller owners the returned tab. virtual BaseTab* CreateTab() = 0; diff --git a/chrome/browser/ui/views/tabs/browser_tab_strip_controller.h b/chrome/browser/ui/views/tabs/browser_tab_strip_controller.h index 18a37e2..4006c11 100644 --- a/chrome/browser/ui/views/tabs/browser_tab_strip_controller.h +++ b/chrome/browser/ui/views/tabs/browser_tab_strip_controller.h @@ -40,52 +40,57 @@ class BrowserTabStripController : public TabStripController, bool IsTabPinned(BaseTab* tab) const; // TabStripController implementation: - virtual int GetCount() const; - virtual bool IsValidIndex(int model_index) const; - virtual bool IsTabSelected(int model_index) const; - virtual bool IsTabPinned(int model_index) const; - virtual bool IsTabCloseable(int model_index) const; - virtual bool IsNewTabPage(int model_index) const; - virtual void SelectTab(int model_index); - virtual void ExtendSelectionTo(int model_index); - virtual void ToggleSelected(int model_index); - virtual void CloseTab(int model_index); - virtual void ShowContextMenuForTab(BaseTab* tab, const gfx::Point& p); - virtual void UpdateLoadingAnimations(); - virtual int HasAvailableDragActions() const; - virtual void PerformDrop(bool drop_before, int index, const GURL& url); - virtual bool IsCompatibleWith(BaseTabStrip* other) const; - virtual void CreateNewTab(); + virtual int GetCount() const OVERRIDE; + virtual bool IsValidIndex(int model_index) const OVERRIDE; + virtual bool IsTabSelected(int model_index) const OVERRIDE; + virtual bool IsTabPinned(int model_index) const OVERRIDE; + virtual bool IsTabCloseable(int model_index) const OVERRIDE; + virtual bool IsNewTabPage(int model_index) const OVERRIDE; + virtual void SelectTab(int model_index) OVERRIDE; + virtual void ExtendSelectionTo(int model_index) OVERRIDE; + virtual void ToggleSelected(int model_index) OVERRIDE; + virtual void CloseTab(int model_index) OVERRIDE; + virtual void ShowContextMenuForTab(BaseTab* tab, + const gfx::Point& p) OVERRIDE; + virtual void UpdateLoadingAnimations() OVERRIDE; + virtual int HasAvailableDragActions() const OVERRIDE; + virtual void PerformDrop(bool drop_before, + int index, + const GURL& url) OVERRIDE; + virtual bool IsCompatibleWith(BaseTabStrip* other) const OVERRIDE; + virtual void CreateNewTab() OVERRIDE; // TabStripModelObserver implementation: virtual void TabInsertedAt(TabContentsWrapper* contents, int model_index, - bool active); - virtual void TabDetachedAt(TabContentsWrapper* contents, int model_index); + bool active) OVERRIDE; + virtual void TabDetachedAt(TabContentsWrapper* contents, + int model_index) OVERRIDE; virtual void TabSelectedAt(TabContentsWrapper* old_contents, TabContentsWrapper* contents, int model_index, - bool user_gesture); + bool user_gesture) OVERRIDE; virtual void TabMoved(TabContentsWrapper* contents, int from_model_index, - int to_model_index); + int to_model_index) OVERRIDE; virtual void TabChangedAt(TabContentsWrapper* contents, int model_index, - TabChangeType change_type); + TabChangeType change_type) OVERRIDE; virtual void TabReplacedAt(TabStripModel* tab_strip_model, TabContentsWrapper* old_contents, TabContentsWrapper* new_contents, - int model_index); + int model_index) OVERRIDE; virtual void TabPinnedStateChanged(TabContentsWrapper* contents, - int model_index); + int model_index) OVERRIDE; virtual void TabMiniStateChanged(TabContentsWrapper* contents, - int model_index); + int model_index) OVERRIDE; virtual void TabBlockedStateChanged(TabContentsWrapper* contents, - int model_index); + int model_index) OVERRIDE; // NotificationObserver implementation: - virtual void Observe(NotificationType type, const NotificationSource& source, - const NotificationDetails& details); + virtual void Observe(NotificationType type, + const NotificationSource& source, + const NotificationDetails& details) OVERRIDE; private: class TabContextMenuContents; diff --git a/chrome/browser/ui/views/tabs/dragged_tab_controller.h b/chrome/browser/ui/views/tabs/dragged_tab_controller.h index 8986ef8..1767c46 100644 --- a/chrome/browser/ui/views/tabs/dragged_tab_controller.h +++ b/chrome/browser/ui/views/tabs/dragged_tab_controller.h @@ -133,34 +133,36 @@ class DraggedTabController : public TabContentsDelegate, const GURL& url, const GURL& referrer, WindowOpenDisposition disposition, - PageTransition::Type transition); + PageTransition::Type transition) OVERRIDE; virtual void NavigationStateChanged(const TabContents* source, - unsigned changed_flags); + unsigned changed_flags) OVERRIDE; virtual void AddNewContents(TabContents* source, TabContents* new_contents, WindowOpenDisposition disposition, const gfx::Rect& initial_pos, - bool user_gesture); - virtual void ActivateContents(TabContents* contents); - virtual void DeactivateContents(TabContents* contents); - virtual void LoadingStateChanged(TabContents* source); - virtual void CloseContents(TabContents* source); - virtual void MoveContents(TabContents* source, const gfx::Rect& pos); - virtual void ToolbarSizeChanged(TabContents* source, bool is_animating); - virtual void UpdateTargetURL(TabContents* source, const GURL& url); + bool user_gesture) OVERRIDE; + virtual void ActivateContents(TabContents* contents) OVERRIDE; + virtual void DeactivateContents(TabContents* contents) OVERRIDE; + virtual void LoadingStateChanged(TabContents* source) OVERRIDE; + virtual void CloseContents(TabContents* source) OVERRIDE; + virtual void MoveContents(TabContents* source, + const gfx::Rect& pos) OVERRIDE; + virtual void ToolbarSizeChanged(TabContents* source, + bool is_animating) OVERRIDE; + virtual void UpdateTargetURL(TabContents* source, const GURL& url) OVERRIDE; // Overridden from NotificationObserver: virtual void Observe(NotificationType type, const NotificationSource& source, - const NotificationDetails& details); + const NotificationDetails& details) OVERRIDE; // Overridden from MessageLoop::Observer: #if defined(OS_WIN) - virtual void WillProcessMessage(const MSG& msg); - virtual void DidProcessMessage(const MSG& msg); + virtual void WillProcessMessage(const MSG& msg) OVERRIDE; + virtual void DidProcessMessage(const MSG& msg) OVERRIDE; #else - virtual void WillProcessEvent(GdkEvent* event); - virtual void DidProcessEvent(GdkEvent* event); + virtual void WillProcessEvent(GdkEvent* event) OVERRIDE; + virtual void DidProcessEvent(GdkEvent* event) OVERRIDE; #endif // Initialize the offset used to calculate the position to create windows diff --git a/chrome/browser/ui/views/tabs/dragged_tab_view.h b/chrome/browser/ui/views/tabs/dragged_tab_view.h index 5965de9..1646de9 100644 --- a/chrome/browser/ui/views/tabs/dragged_tab_view.h +++ b/chrome/browser/ui/views/tabs/dragged_tab_view.h @@ -54,9 +54,9 @@ class DraggedTabView : public views::View { private: // Overridden from views::View: - virtual void OnPaint(gfx::Canvas* canvas); - virtual void Layout(); - virtual gfx::Size GetPreferredSize(); + virtual void OnPaint(gfx::Canvas* canvas) OVERRIDE; + virtual void Layout() OVERRIDE; + virtual gfx::Size GetPreferredSize() OVERRIDE; // Paint the view, when it's not attached to any TabStrip. void PaintDetachedView(gfx::Canvas* canvas); diff --git a/chrome/browser/ui/views/tabs/native_view_photobooth.h b/chrome/browser/ui/views/tabs/native_view_photobooth.h index cd56ffe..7091b40 100644 --- a/chrome/browser/ui/views/tabs/native_view_photobooth.h +++ b/chrome/browser/ui/views/tabs/native_view_photobooth.h @@ -6,6 +6,7 @@ #define CHROME_BROWSER_UI_VIEWS_TABS_NATIVE_VIEW_PHOTOBOOTH_H_ #pragma once +#include "base/compiler_specific.h" #include "ui/gfx/native_widget_types.h" namespace gfx { diff --git a/chrome/browser/ui/views/tabs/native_view_photobooth_gtk.h b/chrome/browser/ui/views/tabs/native_view_photobooth_gtk.h index f2082db..9f90370 100644 --- a/chrome/browser/ui/views/tabs/native_view_photobooth_gtk.h +++ b/chrome/browser/ui/views/tabs/native_view_photobooth_gtk.h @@ -6,6 +6,7 @@ #define CHROME_BROWSER_UI_VIEWS_TABS_NATIVE_VIEW_PHOTOBOOTH_GTK_H_ #pragma once +#include "base/compiler_specific.h" #include "chrome/browser/ui/views/tabs/native_view_photobooth.h" class NativeViewPhotoboothGtk : public NativeViewPhotobooth { @@ -16,12 +17,13 @@ class NativeViewPhotoboothGtk : public NativeViewPhotobooth { virtual ~NativeViewPhotoboothGtk(); // Replaces the view in the photo booth with the specified one. - virtual void Replace(gfx::NativeView new_view); + virtual void Replace(gfx::NativeView new_view) OVERRIDE; // Paints the current display image of the window into |canvas|, clipped to // |target_bounds|. - virtual void PaintScreenshotIntoCanvas(gfx::Canvas* canvas, - const gfx::Rect& target_bounds); + virtual void PaintScreenshotIntoCanvas( + gfx::Canvas* canvas, + const gfx::Rect& target_bounds) OVERRIDE; private: DISALLOW_COPY_AND_ASSIGN(NativeViewPhotoboothGtk); diff --git a/chrome/browser/ui/views/tabs/native_view_photobooth_win.h b/chrome/browser/ui/views/tabs/native_view_photobooth_win.h index 44402ae..94cff1b 100644 --- a/chrome/browser/ui/views/tabs/native_view_photobooth_win.h +++ b/chrome/browser/ui/views/tabs/native_view_photobooth_win.h @@ -35,12 +35,13 @@ class NativeViewPhotoboothWin : public NativeViewPhotobooth { virtual ~NativeViewPhotoboothWin(); // Replaces the view in the photo booth with the specified one. - virtual void Replace(gfx::NativeView new_view); + virtual void Replace(gfx::NativeView new_view) OVERRIDE; // Paints the current display image of the window into |canvas|, clipped to // |target_bounds|. - virtual void PaintScreenshotIntoCanvas(gfx::Canvas* canvas, - const gfx::Rect& target_bounds); + virtual void PaintScreenshotIntoCanvas( + gfx::Canvas* canvas, + const gfx::Rect& target_bounds) OVERRIDE; private: // Creates a mostly off-screen window to contain the HWND to be captured. diff --git a/chrome/browser/ui/views/tabs/side_tab.h b/chrome/browser/ui/views/tabs/side_tab.h index 540c45e..a04c79f 100644 --- a/chrome/browser/ui/views/tabs/side_tab.h +++ b/chrome/browser/ui/views/tabs/side_tab.h @@ -21,13 +21,13 @@ class SideTab : public BaseTab { static int GetPreferredHeight(); // views::View Overrides: - virtual void Layout(); - virtual void OnPaint(gfx::Canvas* canvas); - virtual gfx::Size GetPreferredSize(); + virtual void Layout() OVERRIDE; + virtual void OnPaint(gfx::Canvas* canvas) OVERRIDE; + virtual gfx::Size GetPreferredSize() OVERRIDE; protected: - virtual const gfx::Rect& GetTitleBounds() const; - virtual const gfx::Rect& GetIconBounds() const; + virtual const gfx::Rect& GetTitleBounds() const OVERRIDE; + virtual const gfx::Rect& GetIconBounds() const OVERRIDE; // Returns true if the selected highlight should be rendered. virtual bool ShouldPaintHighlight() const; diff --git a/chrome/browser/ui/views/tabs/side_tab_strip.h b/chrome/browser/ui/views/tabs/side_tab_strip.h index 74c887e..6ad4bc0 100644 --- a/chrome/browser/ui/views/tabs/side_tab_strip.h +++ b/chrome/browser/ui/views/tabs/side_tab_strip.h @@ -19,20 +19,20 @@ class SideTabStrip : public BaseTabStrip { virtual ~SideTabStrip(); // AbstractTabStripView implementation: - virtual bool IsPositionInWindowCaption(const gfx::Point& point); - virtual void SetBackgroundOffset(const gfx::Point& offset); + virtual bool IsPositionInWindowCaption(const gfx::Point& point) OVERRIDE; + virtual void SetBackgroundOffset(const gfx::Point& offset) OVERRIDE; // BaseTabStrip implementation: - virtual void StartHighlight(int model_index); - virtual void StopAllHighlighting(); - virtual BaseTab* CreateTabForDragging(); - virtual void RemoveTabAt(int model_index); - virtual void SelectTabAt(int old_model_index, int new_model_index); - virtual void TabTitleChangedNotLoading(int model_index); + virtual void StartHighlight(int model_index) OVERRIDE; + virtual void StopAllHighlighting() OVERRIDE; + virtual BaseTab* CreateTabForDragging() OVERRIDE; + virtual void RemoveTabAt(int model_index) OVERRIDE; + virtual void SelectTabAt(int old_model_index, int new_model_index) OVERRIDE; + virtual void TabTitleChangedNotLoading(int model_index) OVERRIDE; // views::View overrides: - virtual gfx::Size GetPreferredSize(); - virtual void PaintChildren(gfx::Canvas* canvas); + virtual gfx::Size GetPreferredSize() OVERRIDE; + virtual void PaintChildren(gfx::Canvas* canvas) OVERRIDE; protected: // BaseTabStrip overrides: diff --git a/chrome/browser/ui/views/tabs/tab_strip.h b/chrome/browser/ui/views/tabs/tab_strip.h index aa90c0f..2ba71a1 100644 --- a/chrome/browser/ui/views/tabs/tab_strip.h +++ b/chrome/browser/ui/views/tabs/tab_strip.h @@ -53,11 +53,11 @@ class TabStrip : public BaseTabStrip, gfx::Rect GetNewTabButtonBounds(); // MouseWatcherListener overrides: - virtual void MouseMovedOutOfView(); + virtual void MouseMovedOutOfView() OVERRIDE; // AbstractTabStripView implementation: - virtual bool IsPositionInWindowCaption(const gfx::Point& point); - virtual void SetBackgroundOffset(const gfx::Point& offset); + virtual bool IsPositionInWindowCaption(const gfx::Point& point) OVERRIDE; + virtual void SetBackgroundOffset(const gfx::Point& offset) OVERRIDE; // BaseTabStrip implementation: virtual void PrepareForCloseAt(int model_index) OVERRIDE; |