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

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

Issue 3017055: Merge 54767 - [Mac] M6 Omnibox positioning changes.... (Closed) Base URL: svn://svn.chromium.org/chrome/branches/472/src/
Patch Set: Created 10 years, 4 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/cocoa/location_bar/page_action_decoration.mm ('k') | no next file » | 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/cocoa/location_bar/star_decoration.h" 5 #import "chrome/browser/cocoa/location_bar/star_decoration.h"
6 6
7 #include "app/l10n_util_mac.h" 7 #include "app/l10n_util_mac.h"
8 #include "chrome/app/chrome_dll_resource.h" 8 #include "chrome/app/chrome_dll_resource.h"
9 #import "chrome/browser/autocomplete/autocomplete_edit_view_mac.h" 9 #import "chrome/browser/autocomplete/autocomplete_edit_view_mac.h"
10 #include "chrome/browser/command_updater.h" 10 #include "chrome/browser/command_updater.h"
11 #include "grit/generated_resources.h" 11 #include "grit/generated_resources.h"
12 #include "grit/theme_resources.h" 12 #include "grit/theme_resources.h"
13 13
14 namespace { 14 namespace {
15 15
16 // The info-bubble point should look like it points to the point 16 // The info-bubble point should look like it points to the point
17 // between the star's lower tips. Determined via Pixie.app 17 // between the star's lower tips. The popup should be where the
18 // Omnibox popup ends up (2px below field). Determined via Pixie.app
18 // magnification. 19 // magnification.
19 const CGFloat kStarPointYOffset = 4.0; 20 const CGFloat kStarPointYOffset = 2.0;
20 21
21 } // namespace 22 } // namespace
22 23
23 StarDecoration::StarDecoration(CommandUpdater* command_updater) 24 StarDecoration::StarDecoration(CommandUpdater* command_updater)
24 : command_updater_(command_updater) { 25 : command_updater_(command_updater) {
25 SetVisible(true); 26 SetVisible(true);
26 SetStarred(false); 27 SetStarred(false);
27 } 28 }
28 29
29 StarDecoration::~StarDecoration() { 30 StarDecoration::~StarDecoration() {
(...skipping 13 matching lines...) Expand all
43 } 44 }
44 45
45 bool StarDecoration::OnMousePressed(NSRect frame) { 46 bool StarDecoration::OnMousePressed(NSRect frame) {
46 command_updater_->ExecuteCommand(IDC_BOOKMARK_PAGE); 47 command_updater_->ExecuteCommand(IDC_BOOKMARK_PAGE);
47 return true; 48 return true;
48 } 49 }
49 50
50 NSString* StarDecoration::GetToolTip() { 51 NSString* StarDecoration::GetToolTip() {
51 return tooltip_.get(); 52 return tooltip_.get();
52 } 53 }
OLDNEW
« no previous file with comments | « chrome/browser/cocoa/location_bar/page_action_decoration.mm ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698