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

Side by Side Diff: chrome/browser/ui/cocoa/toolbar/toolbar_controller.mm

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 (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 #import "chrome/browser/ui/cocoa/toolbar/toolbar_controller.h" 5 #import "chrome/browser/ui/cocoa/toolbar/toolbar_controller.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 8
9 #include "base/mac/bundle_locations.h" 9 #include "base/mac/bundle_locations.h"
10 #include "base/mac/mac_util.h" 10 #include "base/mac/mac_util.h"
(...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after
102 102
103 // A class registered for C++ notifications. This is used to detect changes in 103 // A class registered for C++ notifications. This is used to detect changes in
104 // preferences and upgrade available notifications. Bridges the notification 104 // preferences and upgrade available notifications. Bridges the notification
105 // back to the ToolbarController. 105 // back to the ToolbarController.
106 class NotificationBridge : public WrenchMenuBadgeController::Delegate { 106 class NotificationBridge : public WrenchMenuBadgeController::Delegate {
107 public: 107 public:
108 explicit NotificationBridge(ToolbarController* controller) 108 explicit NotificationBridge(ToolbarController* controller)
109 : controller_(controller), 109 : controller_(controller),
110 badge_controller_([controller browser]->profile(), this) { 110 badge_controller_([controller browser]->profile(), this) {
111 } 111 }
112 virtual ~NotificationBridge() { 112 ~NotificationBridge() override {}
113 }
114 113
115 void UpdateBadgeSeverity() { 114 void UpdateBadgeSeverity() {
116 badge_controller_.UpdateDelegate(); 115 badge_controller_.UpdateDelegate();
117 } 116 }
118 117
119 virtual void UpdateBadgeSeverity(WrenchMenuBadgeController::BadgeType type, 118 void UpdateBadgeSeverity(WrenchMenuBadgeController::BadgeType type,
120 WrenchIconPainter::Severity severity, 119 WrenchIconPainter::Severity severity,
121 bool animate) override { 120 bool animate) override {
122 [controller_ updateWrenchButtonSeverity:severity animate:animate]; 121 [controller_ updateWrenchButtonSeverity:severity animate:animate];
123 } 122 }
124 123
125 void OnPreferenceChanged(const std::string& pref_name) { 124 void OnPreferenceChanged(const std::string& pref_name) {
126 [controller_ prefChanged:pref_name]; 125 [controller_ prefChanged:pref_name];
127 } 126 }
128 127
129 private: 128 private:
130 ToolbarController* controller_; // weak, owns us 129 ToolbarController* controller_; // weak, owns us
131 130
(...skipping 699 matching lines...) Expand 10 before | Expand all | Expand 10 after
831 - (void)hideDropURLsIndicatorInView:(NSView*)view { 830 - (void)hideDropURLsIndicatorInView:(NSView*)view {
832 // Do nothing. 831 // Do nothing.
833 } 832 }
834 833
835 // (URLDropTargetController protocol) 834 // (URLDropTargetController protocol)
836 - (BOOL)isUnsupportedDropData:(id<NSDraggingInfo>)info { 835 - (BOOL)isUnsupportedDropData:(id<NSDraggingInfo>)info {
837 return drag_util::IsUnsupportedDropData(profile_, info); 836 return drag_util::IsUnsupportedDropData(profile_, info);
838 } 837 }
839 838
840 @end 839 @end
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698