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

Side by Side Diff: chrome/browser/ui/cocoa/location_bar/star_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 #import "chrome/browser/ui/cocoa/location_bar/star_decoration.h" 5 #import "chrome/browser/ui/cocoa/location_bar/star_decoration.h"
6 6
7 #include "chrome/app/chrome_command_ids.h" 7 #include "chrome/app/chrome_command_ids.h"
8 #include "chrome/browser/command_updater.h" 8 #include "chrome/browser/command_updater.h"
9 #import "chrome/browser/ui/cocoa/omnibox/omnibox_view_mac.h" 9 #import "chrome/browser/ui/cocoa/omnibox/omnibox_view_mac.h"
10 #include "grit/generated_resources.h" 10 #include "grit/generated_resources.h"
(...skipping 30 matching lines...) Expand all
41 NSPoint StarDecoration::GetBubblePointInFrame(NSRect frame) { 41 NSPoint StarDecoration::GetBubblePointInFrame(NSRect frame) {
42 const NSRect draw_frame = GetDrawRectInFrame(frame); 42 const NSRect draw_frame = GetDrawRectInFrame(frame);
43 return NSMakePoint(NSMidX(draw_frame), 43 return NSMakePoint(NSMidX(draw_frame),
44 NSMaxY(draw_frame) - kStarPointYOffset); 44 NSMaxY(draw_frame) - kStarPointYOffset);
45 } 45 }
46 46
47 bool StarDecoration::AcceptsMousePress() { 47 bool StarDecoration::AcceptsMousePress() {
48 return true; 48 return true;
49 } 49 }
50 50
51 bool StarDecoration::OnMousePressed(NSRect frame) { 51 bool StarDecoration::OnMousePressed(NSRect frame, NSPoint location) {
52 command_updater_->ExecuteCommand(IDC_BOOKMARK_PAGE); 52 command_updater_->ExecuteCommand(IDC_BOOKMARK_PAGE);
53 return true; 53 return true;
54 } 54 }
55 55
56 NSString* StarDecoration::GetToolTip() { 56 NSString* StarDecoration::GetToolTip() {
57 return tooltip_.get(); 57 return tooltip_.get();
58 } 58 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/cocoa/location_bar/star_decoration.h ('k') | chrome/browser/ui/cocoa/location_bar/translate_decoration.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698