Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1291)

Side by Side Diff: chrome/browser/ui/cocoa/location_bar/translate_decoration.h

Issue 671653002: Standardize usage of virtual/override/final in chrome/browser/ui/ (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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_COCOA_LOCATION_BAR_TRANSLATE_DECORATION_H_ 5 #ifndef CHROME_BROWSER_UI_COCOA_LOCATION_BAR_TRANSLATE_DECORATION_H_
6 #define CHROME_BROWSER_UI_COCOA_LOCATION_BAR_TRANSLATE_DECORATION_H_ 6 #define CHROME_BROWSER_UI_COCOA_LOCATION_BAR_TRANSLATE_DECORATION_H_
7 7
8 #import <Cocoa/Cocoa.h> 8 #import <Cocoa/Cocoa.h>
9 9
10 #include "chrome/browser/ui/cocoa/location_bar/image_decoration.h" 10 #include "chrome/browser/ui/cocoa/location_bar/image_decoration.h"
11 11
12 class CommandUpdater; 12 class CommandUpdater;
13 @class TranslateBubbleController; 13 @class TranslateBubbleController;
14 14
15 // Translate icon on the right side of the field. This appears when 15 // Translate icon on the right side of the field. This appears when
16 // translation is available on the current page. This icon is lit when 16 // translation is available on the current page. This icon is lit when
17 // translation is already done, otherwise not lit. 17 // translation is already done, otherwise not lit.
18 class TranslateDecoration : public ImageDecoration { 18 class TranslateDecoration : public ImageDecoration {
19 public: 19 public:
20 explicit TranslateDecoration(CommandUpdater* command_updater); 20 explicit TranslateDecoration(CommandUpdater* command_updater);
21 virtual ~TranslateDecoration(); 21 ~TranslateDecoration() override;
22 22
23 // Toggles the icon on or off. 23 // Toggles the icon on or off.
24 void SetLit(bool on); 24 void SetLit(bool on);
25 25
26 // Implement |LocationBarDecoration| 26 // Implement |LocationBarDecoration|
27 virtual bool AcceptsMousePress() override; 27 bool AcceptsMousePress() override;
28 virtual bool OnMousePressed(NSRect frame, NSPoint location) override; 28 bool OnMousePressed(NSRect frame, NSPoint location) override;
29 virtual NSString* GetToolTip() override; 29 NSString* GetToolTip() override;
30 virtual NSPoint GetBubblePointInFrame(NSRect frame) override; 30 NSPoint GetBubblePointInFrame(NSRect frame) override;
31 31
32 private: 32 private:
33 // For showing the translate bubble up. 33 // For showing the translate bubble up.
34 CommandUpdater* command_updater_; // Weak, owned by Browser. 34 CommandUpdater* command_updater_; // Weak, owned by Browser.
35 35
36 DISALLOW_COPY_AND_ASSIGN(TranslateDecoration); 36 DISALLOW_COPY_AND_ASSIGN(TranslateDecoration);
37 }; 37 };
38 38
39 #endif // CHROME_BROWSER_UI_COCOA_LOCATION_BAR_TRANSLATE_DECORATION_H_ 39 #endif // CHROME_BROWSER_UI_COCOA_LOCATION_BAR_TRANSLATE_DECORATION_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698