Commit c3217160 authored by dcheng's avatar dcheng Committed by Commit bot

Standardize usage of virtual/override/final specifiers.

The Google C++ style guide states:

  Explicitly annotate overrides of virtual functions or virtual
  destructors with an override or (less frequently) final specifier.
  Older (pre-C++11) code will use the virtual keyword as an inferior
  alternative annotation. For clarity, use exactly one of override,
  final, or virtual when declaring an override.

To better conform to these guidelines, the following constructs have
been rewritten:

- if a base class has a virtual destructor, then:
    virtual ~Foo();                   ->  ~Foo() override;
- virtual void Foo() override;        ->  void Foo() override;
- virtual void Foo() override final;  ->  void Foo() final;

This patch was automatically generated. The clang plugin can generate
fixit hints, which are suggested edits when it is 100% sure it knows how
to fix a problem. The hints from the clang plugin were applied to the
source tree using the tool in https://codereview.chromium.org/598073004.

BUG=417463
R=jochen@chromium.org

Review URL: https://codereview.chromium.org/678093002

Cr-Commit-Position: refs/heads/master@{#302646}
parent da52c1a8
...@@ -41,7 +41,7 @@ class ContentSettingImageView : public gfx::AnimationDelegate, ...@@ -41,7 +41,7 @@ class ContentSettingImageView : public gfx::AnimationDelegate,
const gfx::FontList& font_list, const gfx::FontList& font_list,
SkColor text_color, SkColor text_color,
SkColor parent_background_color); SkColor parent_background_color);
virtual ~ContentSettingImageView(); ~ContentSettingImageView() override;
// Updates the decoration from the shown WebContents. // Updates the decoration from the shown WebContents.
void Update(content::WebContents* web_contents); void Update(content::WebContents* web_contents);
...@@ -63,20 +63,20 @@ class ContentSettingImageView : public gfx::AnimationDelegate, ...@@ -63,20 +63,20 @@ class ContentSettingImageView : public gfx::AnimationDelegate,
static int GetBubbleOuterPadding(bool by_icon); static int GetBubbleOuterPadding(bool by_icon);
// gfx::AnimationDelegate: // gfx::AnimationDelegate:
virtual void AnimationEnded(const gfx::Animation* animation) override; void AnimationEnded(const gfx::Animation* animation) override;
virtual void AnimationProgressed(const gfx::Animation* animation) override; void AnimationProgressed(const gfx::Animation* animation) override;
virtual void AnimationCanceled(const gfx::Animation* animation) override; void AnimationCanceled(const gfx::Animation* animation) override;
// views::View: // views::View:
virtual gfx::Size GetPreferredSize() const override; gfx::Size GetPreferredSize() const override;
virtual void Layout() override; void Layout() override;
virtual bool OnMousePressed(const ui::MouseEvent& event) override; bool OnMousePressed(const ui::MouseEvent& event) override;
virtual void OnMouseReleased(const ui::MouseEvent& event) override; void OnMouseReleased(const ui::MouseEvent& event) override;
virtual void OnGestureEvent(ui::GestureEvent* event) override; void OnGestureEvent(ui::GestureEvent* event) override;
virtual void OnPaintBackground(gfx::Canvas* canvas) override; void OnPaintBackground(gfx::Canvas* canvas) override;
// views::WidgetObserver: // views::WidgetObserver:
virtual void OnWidgetDestroying(views::Widget* widget) override; void OnWidgetDestroying(views::Widget* widget) override;
bool background_showing() const { bool background_showing() const {
return slide_animator_.is_animating() || pause_animation_; return slide_animator_.is_animating() || pause_animation_;
......
...@@ -17,13 +17,13 @@ class EVBubbleView : public IconLabelBubbleView { ...@@ -17,13 +17,13 @@ class EVBubbleView : public IconLabelBubbleView {
SkColor text_color, SkColor text_color,
SkColor parent_background_color, SkColor parent_background_color,
LocationBarView* parent); LocationBarView* parent);
virtual ~EVBubbleView(); ~EVBubbleView() override;
// IconLabelBubbleView: // IconLabelBubbleView:
virtual gfx::Size GetMinimumSize() const override; gfx::Size GetMinimumSize() const override;
virtual bool OnMousePressed(const ui::MouseEvent& event) override; bool OnMousePressed(const ui::MouseEvent& event) override;
virtual void OnMouseReleased(const ui::MouseEvent& event) override; void OnMouseReleased(const ui::MouseEvent& event) override;
virtual void OnGestureEvent(ui::GestureEvent* event) override; void OnGestureEvent(ui::GestureEvent* event) override;
// Returns what the minimum size would be if the label text were |text|. // Returns what the minimum size would be if the label text were |text|.
gfx::Size GetMinimumSizeForLabelText(const base::string16& text) const; gfx::Size GetMinimumSizeForLabelText(const base::string16& text) const;
......
...@@ -28,14 +28,14 @@ class GeneratedCreditCardBubbleController; ...@@ -28,14 +28,14 @@ class GeneratedCreditCardBubbleController;
class GeneratedCreditCardView : public LocationBarDecorationView { class GeneratedCreditCardView : public LocationBarDecorationView {
public: public:
explicit GeneratedCreditCardView(LocationBarView::Delegate* delegate); explicit GeneratedCreditCardView(LocationBarView::Delegate* delegate);
virtual ~GeneratedCreditCardView(); ~GeneratedCreditCardView() override;
void Update(); void Update();
protected: protected:
// LocationBarDecorationView: // LocationBarDecorationView:
virtual bool CanHandleClick() const override; bool CanHandleClick() const override;
virtual void OnClick() override; void OnClick() override;
private: private:
// Helper to get the GeneratedCreditCardBubbleController associated with the // Helper to get the GeneratedCreditCardBubbleController associated with the
......
...@@ -38,7 +38,7 @@ class IconLabelBubbleView : public views::View { ...@@ -38,7 +38,7 @@ class IconLabelBubbleView : public views::View {
SkColor text_color, SkColor text_color,
SkColor parent_background_color, SkColor parent_background_color,
bool elide_in_middle); bool elide_in_middle);
virtual ~IconLabelBubbleView(); ~IconLabelBubbleView() override;
void SetLabel(const base::string16& label); void SetLabel(const base::string16& label);
void SetImage(const gfx::ImageSkia& image); void SetImage(const gfx::ImageSkia& image);
...@@ -48,10 +48,10 @@ class IconLabelBubbleView : public views::View { ...@@ -48,10 +48,10 @@ class IconLabelBubbleView : public views::View {
protected: protected:
// views::View: // views::View:
virtual gfx::Size GetPreferredSize() const override; gfx::Size GetPreferredSize() const override;
virtual void Layout() override; void Layout() override;
virtual void OnMouseEntered(const ui::MouseEvent& event) override; void OnMouseEntered(const ui::MouseEvent& event) override;
virtual void OnMouseExited(const ui::MouseEvent& event) override; void OnMouseExited(const ui::MouseEvent& event) override;
const gfx::FontList& font_list() const { return label_->font_list(); } const gfx::FontList& font_list() const { return label_->font_list(); }
...@@ -66,7 +66,7 @@ class IconLabelBubbleView : public views::View { ...@@ -66,7 +66,7 @@ class IconLabelBubbleView : public views::View {
static int GetBubbleOuterPadding(bool by_icon); static int GetBubbleOuterPadding(bool by_icon);
// views::View: // views::View:
virtual void OnPaint(gfx::Canvas* canvas) override; void OnPaint(gfx::Canvas* canvas) override;
int GetPreLabelWidth() const; int GetPreLabelWidth() const;
......
...@@ -36,15 +36,15 @@ class KeywordHintView : public views::View { ...@@ -36,15 +36,15 @@ class KeywordHintView : public views::View {
const gfx::FontList& font_list, const gfx::FontList& font_list,
SkColor text_color, SkColor text_color,
SkColor background_color); SkColor background_color);
virtual ~KeywordHintView(); ~KeywordHintView() override;
void SetKeyword(const base::string16& keyword); void SetKeyword(const base::string16& keyword);
base::string16 keyword() const { return keyword_; } base::string16 keyword() const { return keyword_; }
virtual gfx::Size GetPreferredSize() const override; gfx::Size GetPreferredSize() const override;
// The minimum size is just big enough to show the tab. // The minimum size is just big enough to show the tab.
virtual gfx::Size GetMinimumSize() const override; gfx::Size GetMinimumSize() const override;
virtual void Layout() override; void Layout() override;
private: private:
views::Label* CreateLabel(const gfx::FontList& font_list, views::Label* CreateLabel(const gfx::FontList& font_list,
......
...@@ -20,13 +20,13 @@ ...@@ -20,13 +20,13 @@
class LocationBarDecorationView : public views::ImageView { class LocationBarDecorationView : public views::ImageView {
public: public:
LocationBarDecorationView(); LocationBarDecorationView();
virtual ~LocationBarDecorationView(); ~LocationBarDecorationView() override;
// views::ImageView: // views::ImageView:
virtual bool OnMousePressed(const ui::MouseEvent& event) override; bool OnMousePressed(const ui::MouseEvent& event) override;
virtual void OnMouseReleased(const ui::MouseEvent& event) override; void OnMouseReleased(const ui::MouseEvent& event) override;
virtual bool OnKeyPressed(const ui::KeyEvent& event) override; bool OnKeyPressed(const ui::KeyEvent& event) override;
virtual void OnGestureEvent(ui::GestureEvent* event) override; void OnGestureEvent(ui::GestureEvent* event) override;
protected: protected:
// Whether this icon should currently be able to process a mouse click. Called // Whether this icon should currently be able to process a mouse click. Called
......
...@@ -138,7 +138,7 @@ class LocationBarView : public LocationBar, ...@@ -138,7 +138,7 @@ class LocationBarView : public LocationBar,
Delegate* delegate, Delegate* delegate,
bool is_popup_mode); bool is_popup_mode);
virtual ~LocationBarView(); ~LocationBarView() override;
// Initializes the LocationBarView. // Initializes the LocationBarView.
void Init(); void Init();
...@@ -239,22 +239,22 @@ class LocationBarView : public LocationBar, ...@@ -239,22 +239,22 @@ class LocationBarView : public LocationBar,
int* right_margin); int* right_margin);
// LocationBar: // LocationBar:
virtual void FocusLocation(bool select_all) override; void FocusLocation(bool select_all) override;
virtual void Revert() override; void Revert() override;
virtual OmniboxView* GetOmniboxView() override; OmniboxView* GetOmniboxView() override;
// views::View: // views::View:
virtual bool HasFocus() const override; bool HasFocus() const override;
virtual void GetAccessibleState(ui::AXViewState* state) override; void GetAccessibleState(ui::AXViewState* state) override;
virtual gfx::Size GetPreferredSize() const override; gfx::Size GetPreferredSize() const override;
virtual void Layout() override; void Layout() override;
// OmniboxEditController: // OmniboxEditController:
virtual void Update(const content::WebContents* contents) override; void Update(const content::WebContents* contents) override;
virtual void ShowURL() override; void ShowURL() override;
virtual void EndOriginChipAnimations(bool cancel_fade) override; void EndOriginChipAnimations(bool cancel_fade) override;
virtual ToolbarModel* GetToolbarModel() override; ToolbarModel* GetToolbarModel() override;
virtual content::WebContents* GetWebContents() override; content::WebContents* GetWebContents() override;
// Thickness of the edges of the omnibox background images, in normal mode. // Thickness of the edges of the omnibox background images, in normal mode.
static const int kNormalEdgeThickness; static const int kNormalEdgeThickness;
...@@ -339,76 +339,74 @@ class LocationBarView : public LocationBar, ...@@ -339,76 +339,74 @@ class LocationBarView : public LocationBar,
void ResetShowAnimationAndColors(); void ResetShowAnimationAndColors();
// LocationBar: // LocationBar:
virtual void ShowFirstRunBubble() override; void ShowFirstRunBubble() override;
virtual GURL GetDestinationURL() const override; GURL GetDestinationURL() const override;
virtual WindowOpenDisposition GetWindowOpenDisposition() const override; WindowOpenDisposition GetWindowOpenDisposition() const override;
virtual ui::PageTransition GetPageTransition() const override; ui::PageTransition GetPageTransition() const override;
virtual void AcceptInput() override; void AcceptInput() override;
virtual void FocusSearch() override; void FocusSearch() override;
virtual void UpdateContentSettingsIcons() override; void UpdateContentSettingsIcons() override;
virtual void UpdateManagePasswordsIconAndBubble() override; void UpdateManagePasswordsIconAndBubble() override;
virtual void UpdatePageActions() override; void UpdatePageActions() override;
virtual void InvalidatePageActions() override; void InvalidatePageActions() override;
virtual void UpdateBookmarkStarVisibility() override; void UpdateBookmarkStarVisibility() override;
virtual bool ShowPageActionPopup(const extensions::Extension* extension, bool ShowPageActionPopup(const extensions::Extension* extension,
bool grant_active_tab) override; bool grant_active_tab) override;
virtual void UpdateOpenPDFInReaderPrompt() override; void UpdateOpenPDFInReaderPrompt() override;
virtual void UpdateGeneratedCreditCardView() override; void UpdateGeneratedCreditCardView() override;
virtual void SaveStateToContents(content::WebContents* contents) override; void SaveStateToContents(content::WebContents* contents) override;
virtual const OmniboxView* GetOmniboxView() const override; const OmniboxView* GetOmniboxView() const override;
virtual LocationBarTesting* GetLocationBarForTesting() override; LocationBarTesting* GetLocationBarForTesting() override;
// LocationBarTesting: // LocationBarTesting:
virtual int PageActionCount() override; int PageActionCount() override;
virtual int PageActionVisibleCount() override; int PageActionVisibleCount() override;
virtual ExtensionAction* GetPageAction(size_t index) override; ExtensionAction* GetPageAction(size_t index) override;
virtual ExtensionAction* GetVisiblePageAction(size_t index) override; ExtensionAction* GetVisiblePageAction(size_t index) override;
virtual void TestPageActionPressed(size_t index) override; void TestPageActionPressed(size_t index) override;
virtual bool GetBookmarkStarVisibility() override; bool GetBookmarkStarVisibility() override;
// views::View: // views::View:
virtual const char* GetClassName() const override; const char* GetClassName() const override;
virtual void OnBoundsChanged(const gfx::Rect& previous_bounds) override; void OnBoundsChanged(const gfx::Rect& previous_bounds) override;
virtual void OnFocus() override; void OnFocus() override;
virtual void OnPaint(gfx::Canvas* canvas) override; void OnPaint(gfx::Canvas* canvas) override;
virtual void PaintChildren(gfx::Canvas* canvas, void PaintChildren(gfx::Canvas* canvas,
const views::CullSet& cull_set) override; const views::CullSet& cull_set) override;
// views::ButtonListener: // views::ButtonListener:
virtual void ButtonPressed(views::Button* sender, void ButtonPressed(views::Button* sender, const ui::Event& event) override;
const ui::Event& event) override;
// views::DragController: // views::DragController:
virtual void WriteDragDataForView(View* sender, void WriteDragDataForView(View* sender,
const gfx::Point& press_pt, const gfx::Point& press_pt,
OSExchangeData* data) override; OSExchangeData* data) override;
virtual int GetDragOperationsForView(View* sender, int GetDragOperationsForView(View* sender, const gfx::Point& p) override;
const gfx::Point& p) override; bool CanStartDragForView(View* sender,
virtual bool CanStartDragForView(View* sender, const gfx::Point& press_pt,
const gfx::Point& press_pt, const gfx::Point& p) override;
const gfx::Point& p) override;
// OmniboxEditController: // OmniboxEditController:
virtual void OnChanged() override; void OnChanged() override;
virtual void OnSetFocus() override; void OnSetFocus() override;
virtual InstantController* GetInstant() override; InstantController* GetInstant() override;
virtual const ToolbarModel* GetToolbarModel() const override; const ToolbarModel* GetToolbarModel() const override;
virtual void HideURL() override; void HideURL() override;
// DropdownBarHostDelegate: // DropdownBarHostDelegate:
virtual void SetFocusAndSelection(bool select_all) override; void SetFocusAndSelection(bool select_all) override;
virtual void SetAnimationOffset(int offset) override; void SetAnimationOffset(int offset) override;
// gfx::AnimationDelegate: // gfx::AnimationDelegate:
virtual void AnimationProgressed(const gfx::Animation* animation) override; void AnimationProgressed(const gfx::Animation* animation) override;
virtual void AnimationEnded(const gfx::Animation* animation) override; void AnimationEnded(const gfx::Animation* animation) override;
// TemplateURLServiceObserver: // TemplateURLServiceObserver:
virtual void OnTemplateURLServiceChanged() override; void OnTemplateURLServiceChanged() override;
// SearchModelObserver: // SearchModelObserver:
virtual void ModelChanged(const SearchModel::State& old_state, void ModelChanged(const SearchModel::State& old_state,
const SearchModel::State& new_state) override; const SearchModel::State& new_state) override;
// The Browser this LocationBarView is in. Note that at least // The Browser this LocationBarView is in. Note that at least
// chromeos::SimpleWebViewDialog uses a LocationBarView outside any browser // chromeos::SimpleWebViewDialog uses a LocationBarView outside any browser
......
...@@ -16,15 +16,15 @@ class LocationBarView; ...@@ -16,15 +16,15 @@ class LocationBarView;
class LocationIconView : public views::ImageView { class LocationIconView : public views::ImageView {
public: public:
explicit LocationIconView(LocationBarView* location_bar); explicit LocationIconView(LocationBarView* location_bar);
virtual ~LocationIconView(); ~LocationIconView() override;
// views::ImageView: // views::ImageView:
virtual bool OnMousePressed(const ui::MouseEvent& event) override; bool OnMousePressed(const ui::MouseEvent& event) override;
virtual void OnMouseReleased(const ui::MouseEvent& event) override; void OnMouseReleased(const ui::MouseEvent& event) override;
virtual bool OnMouseDragged(const ui::MouseEvent& event) override; bool OnMouseDragged(const ui::MouseEvent& event) override;
// ui::EventHandler: // ui::EventHandler:
virtual void OnGestureEvent(ui::GestureEvent* event) override; void OnGestureEvent(ui::GestureEvent* event) override;
// Whether we should show the tooltip for this icon or not. // Whether we should show the tooltip for this icon or not.
void ShowTooltip(bool show); void ShowTooltip(bool show);
......
...@@ -23,7 +23,7 @@ class OpenPDFInReaderView : public views::ImageView, ...@@ -23,7 +23,7 @@ class OpenPDFInReaderView : public views::ImageView,
public views::WidgetObserver { public views::WidgetObserver {
public: public:
OpenPDFInReaderView(); OpenPDFInReaderView();
virtual ~OpenPDFInReaderView(); ~OpenPDFInReaderView() override;
void Update(content::WebContents* web_contents); void Update(content::WebContents* web_contents);
...@@ -31,13 +31,13 @@ class OpenPDFInReaderView : public views::ImageView, ...@@ -31,13 +31,13 @@ class OpenPDFInReaderView : public views::ImageView,
void ShowBubble(); void ShowBubble();
// views::ImageView: // views::ImageView:
virtual void GetAccessibleState(ui::AXViewState* state) override; void GetAccessibleState(ui::AXViewState* state) override;
virtual bool OnMousePressed(const ui::MouseEvent& event) override; bool OnMousePressed(const ui::MouseEvent& event) override;
virtual void OnMouseReleased(const ui::MouseEvent& event) override; void OnMouseReleased(const ui::MouseEvent& event) override;
virtual bool OnKeyPressed(const ui::KeyEvent& event) override; bool OnKeyPressed(const ui::KeyEvent& event) override;
// views::WidgetObserver: // views::WidgetObserver:
virtual void OnWidgetDestroying(views::Widget* widget) override; void OnWidgetDestroying(views::Widget* widget) override;
OpenPDFInReaderBubbleView* bubble_; OpenPDFInReaderBubbleView* bubble_;
......
...@@ -50,11 +50,10 @@ class OriginChipExtensionIcon : public extensions::IconImage::Observer { ...@@ -50,11 +50,10 @@ class OriginChipExtensionIcon : public extensions::IconImage::Observer {
OriginChipExtensionIcon(LocationIconView* icon_view, OriginChipExtensionIcon(LocationIconView* icon_view,
Profile* profile, Profile* profile,
const extensions::Extension* extension); const extensions::Extension* extension);
virtual ~OriginChipExtensionIcon(); ~OriginChipExtensionIcon() override;
// IconImage::Observer: // IconImage::Observer:
virtual void OnExtensionIconImageChanged( void OnExtensionIconImageChanged(extensions::IconImage* image) override;
extensions::IconImage* image) override;
private: private:
LocationIconView* icon_view_; LocationIconView* icon_view_;
......
...@@ -41,7 +41,7 @@ class OriginChipView : public views::LabelButton, ...@@ -41,7 +41,7 @@ class OriginChipView : public views::LabelButton,
OriginChipView(LocationBarView* location_bar_view, OriginChipView(LocationBarView* location_bar_view,
Profile* profile, Profile* profile,
const gfx::FontList& font_list); const gfx::FontList& font_list);
virtual ~OriginChipView(); ~OriginChipView() override;
SkColor pressed_text_color() const { return pressed_text_color_; } SkColor pressed_text_color() const { return pressed_text_color_; }
SkColor pressed_background_color() const { SkColor pressed_background_color() const {
...@@ -68,8 +68,8 @@ class OriginChipView : public views::LabelButton, ...@@ -68,8 +68,8 @@ class OriginChipView : public views::LabelButton,
int WidthFromStartOfLabels() const; int WidthFromStartOfLabels() const;
// views::LabelButton: // views::LabelButton:
virtual gfx::Size GetPreferredSize() const override; gfx::Size GetPreferredSize() const override;
virtual void Layout() override; void Layout() override;
private: private:
// Returns the X coordinate the first label should be placed at. // Returns the X coordinate the first label should be placed at.
...@@ -79,19 +79,18 @@ class OriginChipView : public views::LabelButton, ...@@ -79,19 +79,18 @@ class OriginChipView : public views::LabelButton,
void SetBorderImages(const int images[3][9]); void SetBorderImages(const int images[3][9]);
// views::LabelButton: // views::LabelButton:
virtual void AnimationProgressed(const gfx::Animation* animation) override; void AnimationProgressed(const gfx::Animation* animation) override;
virtual void AnimationEnded(const gfx::Animation* animation) override; void AnimationEnded(const gfx::Animation* animation) override;
virtual void OnPaintBorder(gfx::Canvas* canvas) override; void OnPaintBorder(gfx::Canvas* canvas) override;
virtual void StateChanged() override; void StateChanged() override;
// views::ButtonListener: // views::ButtonListener:
virtual void ButtonPressed(views::Button* sender, void ButtonPressed(views::Button* sender, const ui::Event& event) override;
const ui::Event& event) override;
// SafeBrowsingUIManager::Observer: // SafeBrowsingUIManager::Observer:
virtual void OnSafeBrowsingHit( void OnSafeBrowsingHit(
const SafeBrowsingUIManager::UnsafeResource& resource) override; const SafeBrowsingUIManager::UnsafeResource& resource) override;
virtual void OnSafeBrowsingMatch( void OnSafeBrowsingMatch(
const SafeBrowsingUIManager::UnsafeResource& resource) override; const SafeBrowsingUIManager::UnsafeResource& resource) override;
LocationBarView* location_bar_view_; LocationBarView* location_bar_view_;
......
...@@ -23,13 +23,13 @@ class PageActionWithBadgeView : public views::View { ...@@ -23,13 +23,13 @@ class PageActionWithBadgeView : public views::View {
PageActionImageView* image_view() { return image_view_; } PageActionImageView* image_view() { return image_view_; }
// views::View: // views::View:
virtual void GetAccessibleState(ui::AXViewState* state) override; void GetAccessibleState(ui::AXViewState* state) override;
virtual gfx::Size GetPreferredSize() const override; gfx::Size GetPreferredSize() const override;
void UpdateVisibility(content::WebContents* contents); void UpdateVisibility(content::WebContents* contents);
private: private:
virtual void Layout() override; void Layout() override;
// The button this view contains. // The button this view contains.
PageActionImageView* image_view_; PageActionImageView* image_view_;
......
...@@ -14,7 +14,7 @@ ...@@ -14,7 +14,7 @@
class SearchButton : public views::LabelButton { class SearchButton : public views::LabelButton {
public: public:
explicit SearchButton(views::ButtonListener* listener); explicit SearchButton(views::ButtonListener* listener);
virtual ~SearchButton(); ~SearchButton() override;
// Updates the search button icon to a search icon if |is_search| is true, or // Updates the search button icon to a search icon if |is_search| is true, or
// a navigation icon otherwise. // a navigation icon otherwise.
......
...@@ -24,11 +24,11 @@ class SelectedKeywordView : public IconLabelBubbleView { ...@@ -24,11 +24,11 @@ class SelectedKeywordView : public IconLabelBubbleView {
SkColor text_color, SkColor text_color,
SkColor parent_background_color, SkColor parent_background_color,
Profile* profile); Profile* profile);
virtual ~SelectedKeywordView(); ~SelectedKeywordView() override;
virtual gfx::Size GetPreferredSize() const override; gfx::Size GetPreferredSize() const override;
virtual gfx::Size GetMinimumSize() const override; gfx::Size GetMinimumSize() const override;
virtual void Layout() override; void Layout() override;
// The current keyword, or an empty string if no keyword is displayed. // The current keyword, or an empty string if no keyword is displayed.
void SetKeyword(const base::string16& keyword); void SetKeyword(const base::string16& keyword);
......
...@@ -13,16 +13,15 @@ class CommandUpdater; ...@@ -13,16 +13,15 @@ class CommandUpdater;
class StarView : public BubbleIconView { class StarView : public BubbleIconView {
public: public:
explicit StarView(CommandUpdater* command_updater); explicit StarView(CommandUpdater* command_updater);
virtual ~StarView(); ~StarView() override;
// Toggles the star on or off. // Toggles the star on or off.
void SetToggled(bool on); void SetToggled(bool on);
protected: protected:
// BubbleIconView: // BubbleIconView:
virtual bool IsBubbleShowing() const override; bool IsBubbleShowing() const override;
virtual void OnExecuting( void OnExecuting(BubbleIconView::ExecuteSource execute_source) override;
BubbleIconView::ExecuteSource execute_source) override;
private: private:
DISALLOW_COPY_AND_ASSIGN(StarView); DISALLOW_COPY_AND_ASSIGN(StarView);
......
...@@ -14,16 +14,15 @@ class CommandUpdater; ...@@ -14,16 +14,15 @@ class CommandUpdater;
class TranslateIconView : public BubbleIconView { class TranslateIconView : public BubbleIconView {
public: public:
explicit TranslateIconView(CommandUpdater* command_updater); explicit TranslateIconView(CommandUpdater* command_updater);
virtual ~TranslateIconView(); ~TranslateIconView() override;
// Toggles the icon on or off. // Toggles the icon on or off.
void SetToggled(bool on); void SetToggled(bool on);
protected: protected:
// BubbleIconView: // BubbleIconView:
virtual bool IsBubbleShowing() const override; bool IsBubbleShowing() const override;
virtual void OnExecuting( void OnExecuting(BubbleIconView::ExecuteSource execute_source) override;
BubbleIconView::ExecuteSource execute_source) override;
private: private:
DISALLOW_COPY_AND_ASSIGN(TranslateIconView); DISALLOW_COPY_AND_ASSIGN(TranslateIconView);
......
...@@ -77,7 +77,7 @@ class ZoomBubbleView : public views::BubbleDelegateView, ...@@ -77,7 +77,7 @@ class ZoomBubbleView : public views::BubbleDelegateView,
bool auto_close, bool auto_close,
ImmersiveModeController* immersive_mode_controller, ImmersiveModeController* immersive_mode_controller,
FullscreenController* fullscreen_controller); FullscreenController* fullscreen_controller);
virtual ~ZoomBubbleView(); ~ZoomBubbleView() override;
// If the bubble is not anchored to a view, places the bubble in the top // If the bubble is not anchored to a view, places the bubble in the top
// right (left in RTL) of the |screen_bounds| that contain |web_contents_|'s // right (left in RTL) of the |screen_bounds| that contain |web_contents_|'s
...@@ -103,32 +103,30 @@ class ZoomBubbleView : public views::BubbleDelegateView, ...@@ -103,32 +103,30 @@ class ZoomBubbleView : public views::BubbleDelegateView,
void StopTimer(); void StopTimer();
// extensions::IconImage::Observer overrides: // extensions::IconImage::Observer overrides:
virtual void OnExtensionIconImageChanged( void OnExtensionIconImageChanged(extensions::IconImage* /* image */) override;
extensions::IconImage* /* image */) override;
// views::View methods. // views::View methods.
virtual void OnMouseEntered(const ui::MouseEvent& event) override; void OnMouseEntered(const ui::MouseEvent& event) override;
virtual void OnMouseExited(const ui::MouseEvent& event) override; void OnMouseExited(const ui::MouseEvent& event) override;
// ui::EventHandler method. // ui::EventHandler method.
virtual void OnGestureEvent(ui::GestureEvent* event) override; void OnGestureEvent(ui::GestureEvent* event) override;
// views::ButtonListener method. // views::ButtonListener method.
virtual void ButtonPressed(views::Button* sender, void ButtonPressed(views::Button* sender, const ui::Event& event) override;
const ui::Event& event) override;
// views::BubbleDelegateView method. // views::BubbleDelegateView method.
virtual void Init() override; void Init() override;
virtual void WindowClosing() override; void WindowClosing() override;
// content::NotificationObserver method. // content::NotificationObserver method.
virtual void Observe(int type, void Observe(int type,
const content::NotificationSource& source, const content::NotificationSource& source,
const content::NotificationDetails& details) override; const content::NotificationDetails& details) override;
// ImmersiveModeController::Observer methods. // ImmersiveModeController::Observer methods.
virtual void OnImmersiveRevealStarted() override; void OnImmersiveRevealStarted() override;
virtual void OnImmersiveModeControllerDestroyed() override; void OnImmersiveModeControllerDestroyed() override;
ZoomBubbleExtensionInfo extension_info_; ZoomBubbleExtensionInfo extension_info_;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment