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

Side by Side Diff: chrome/browser/ui/cocoa/location_bar/button_decoration.mm

Issue 233623002: Shows the info bubble when the location bar icon is clicked in the origin chip. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Rebase. Created 6 years, 7 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 #include <cmath> 5 #include <cmath>
6 6
7 #import "chrome/browser/ui/cocoa/location_bar/button_decoration.h" 7 #import "chrome/browser/ui/cocoa/location_bar/button_decoration.h"
8 8
9 #include "base/logging.h" 9 #include "base/logging.h"
10 #import "base/mac/scoped_nsobject.h" 10 #import "base/mac/scoped_nsobject.h"
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
57 } 57 }
58 58
59 void ButtonDecoration::SetButtonState(ButtonDecoration::ButtonState state) { 59 void ButtonDecoration::SetButtonState(ButtonDecoration::ButtonState state) {
60 state_ = state; 60 state_ = state;
61 } 61 }
62 62
63 ButtonDecoration::ButtonState ButtonDecoration::GetButtonState() const { 63 ButtonDecoration::ButtonState ButtonDecoration::GetButtonState() const {
64 return state_; 64 return state_;
65 } 65 }
66 66
67 bool ButtonDecoration::PreventFocus(NSPoint location) const {
68 return false;
69 }
70
67 void ButtonDecoration::SetIcon(ButtonState state, int icon_id) { 71 void ButtonDecoration::SetIcon(ButtonState state, int icon_id) {
68 switch (state) { 72 switch (state) {
69 case kButtonStateNormal: 73 case kButtonStateNormal:
70 normal_icon_id_ = icon_id; 74 normal_icon_id_ = icon_id;
71 break; 75 break;
72 case kButtonStateHover: 76 case kButtonStateHover:
73 hover_icon_id_ = icon_id; 77 hover_icon_id_ = icon_id;
74 break; 78 break;
75 case kButtonStatePressed: 79 case kButtonStatePressed:
76 pressed_icon_id_ = icon_id; 80 pressed_icon_id_ = icon_id;
(...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after
162 } 166 }
163 167
164 bool ButtonDecoration::AcceptsMousePress() { 168 bool ButtonDecoration::AcceptsMousePress() {
165 return true; 169 return true;
166 } 170 }
167 171
168 bool ButtonDecoration::IsDraggable() { 172 bool ButtonDecoration::IsDraggable() {
169 return false; 173 return false;
170 } 174 }
171 175
172 bool ButtonDecoration::OnMousePressed(NSRect frame) { 176 bool ButtonDecoration::OnMousePressed(NSRect frame, NSPoint location) {
173 return false; 177 return false;
174 } 178 }
175 179
176 ButtonDecoration* ButtonDecoration::AsButtonDecoration() { 180 ButtonDecoration* ButtonDecoration::AsButtonDecoration() {
177 return this; 181 return this;
178 } 182 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698