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

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

Issue 6546073: More OOLing on Mac. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Yeap Created 9 years, 10 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 | Annotate | Revision Log
« no previous file with comments | « chrome/browser/ui/cocoa/location_bar/star_decoration.h ('k') | chrome/chrome_tests.gypi » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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 #import "chrome/browser/autocomplete/autocomplete_edit_view_mac.h" 8 #import "chrome/browser/autocomplete/autocomplete_edit_view_mac.h"
9 #include "chrome/browser/command_updater.h" 9 #include "chrome/browser/command_updater.h"
10 #include "grit/generated_resources.h" 10 #include "grit/generated_resources.h"
(...skipping 25 matching lines...) Expand all
36 SetImage(AutocompleteEditViewMac::ImageForResource(image_id)); 36 SetImage(AutocompleteEditViewMac::ImageForResource(image_id));
37 tooltip_.reset([l10n_util::GetNSStringWithFixup(tip_id) retain]); 37 tooltip_.reset([l10n_util::GetNSStringWithFixup(tip_id) retain]);
38 } 38 }
39 39
40 NSPoint StarDecoration::GetBubblePointInFrame(NSRect frame) { 40 NSPoint StarDecoration::GetBubblePointInFrame(NSRect frame) {
41 const NSRect draw_frame = GetDrawRectInFrame(frame); 41 const NSRect draw_frame = GetDrawRectInFrame(frame);
42 return NSMakePoint(NSMidX(draw_frame), 42 return NSMakePoint(NSMidX(draw_frame),
43 NSMaxY(draw_frame) - kStarPointYOffset); 43 NSMaxY(draw_frame) - kStarPointYOffset);
44 } 44 }
45 45
46 bool StarDecoration::AcceptsMousePress() {
47 return true;
48 }
49
46 bool StarDecoration::OnMousePressed(NSRect frame) { 50 bool StarDecoration::OnMousePressed(NSRect frame) {
47 command_updater_->ExecuteCommand(IDC_BOOKMARK_PAGE); 51 command_updater_->ExecuteCommand(IDC_BOOKMARK_PAGE);
48 return true; 52 return true;
49 } 53 }
50 54
51 NSString* StarDecoration::GetToolTip() { 55 NSString* StarDecoration::GetToolTip() {
52 return tooltip_.get(); 56 return tooltip_.get();
53 } 57 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/cocoa/location_bar/star_decoration.h ('k') | chrome/chrome_tests.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698