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

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

Issue 3046029: [Mac] First pass at final sizing of toolbar items. (Closed) Base URL: git://codf21.jail/chromium.git
Patch Set: Don't disable unit tests for realz, sorry. 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
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/location_bar_view_mac.h" 5 #import "chrome/browser/cocoa/location_bar/location_bar_view_mac.h"
6 6
7 #include "app/l10n_util_mac.h" 7 #include "app/l10n_util_mac.h"
8 #include "app/resource_bundle.h" 8 #include "app/resource_bundle.h"
9 #include "base/i18n/rtl.h" 9 #include "base/i18n/rtl.h"
10 #include "base/nsimage_cache_mac.h" 10 #include "base/nsimage_cache_mac.h"
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after
62 ToolbarModel* toolbar_model, 62 ToolbarModel* toolbar_model,
63 Profile* profile, 63 Profile* profile,
64 Browser* browser) 64 Browser* browser)
65 : edit_view_(new AutocompleteEditViewMac(this, toolbar_model, profile, 65 : edit_view_(new AutocompleteEditViewMac(this, toolbar_model, profile,
66 command_updater, field)), 66 command_updater, field)),
67 command_updater_(command_updater), 67 command_updater_(command_updater),
68 field_(field), 68 field_(field),
69 disposition_(CURRENT_TAB), 69 disposition_(CURRENT_TAB),
70 location_icon_decoration_(new LocationIconDecoration(this)), 70 location_icon_decoration_(new LocationIconDecoration(this)),
71 selected_keyword_decoration_( 71 selected_keyword_decoration_(
72 new SelectedKeywordDecoration([field_ font])), 72 new SelectedKeywordDecoration(
73 AutocompleteEditViewMac::GetFieldFont())),
73 ev_bubble_decoration_( 74 ev_bubble_decoration_(
74 new EVBubbleDecoration(location_icon_decoration_.get(), 75 new EVBubbleDecoration(location_icon_decoration_.get(),
75 [field_ font])), 76 AutocompleteEditViewMac::GetFieldFont())),
76 star_decoration_(new StarDecoration(command_updater)), 77 star_decoration_(new StarDecoration(command_updater)),
77 keyword_hint_decoration_(new KeywordHintDecoration([field_ font])), 78 keyword_hint_decoration_(
79 new KeywordHintDecoration(AutocompleteEditViewMac::GetFieldFont())),
78 profile_(profile), 80 profile_(profile),
79 browser_(browser), 81 browser_(browser),
80 toolbar_model_(toolbar_model), 82 toolbar_model_(toolbar_model),
81 transition_(PageTransition::TYPED), 83 transition_(PageTransition::TYPED),
82 first_run_bubble_(this) { 84 first_run_bubble_(this) {
83 for (size_t i = 0; i < CONTENT_SETTINGS_NUM_TYPES; ++i) { 85 for (size_t i = 0; i < CONTENT_SETTINGS_NUM_TYPES; ++i) {
84 DCHECK_EQ(i, content_setting_decorations_.size()); 86 DCHECK_EQ(i, content_setting_decorations_.size());
85 ContentSettingsType type = static_cast<ContentSettingsType>(i); 87 ContentSettingsType type = static_cast<ContentSettingsType>(i);
86 content_setting_decorations_.push_back( 88 content_setting_decorations_.push_back(
87 new ContentSettingDecoration(type, this, profile_)); 89 new ContentSettingDecoration(type, this, profile_));
(...skipping 446 matching lines...) Expand 10 before | Expand all | Expand 10 after
534 536
535 // These need to change anytime the layout changes. 537 // These need to change anytime the layout changes.
536 // TODO(shess): Anytime the field editor might have changed, the 538 // TODO(shess): Anytime the field editor might have changed, the
537 // cursor rects almost certainly should have changed. The tooltips 539 // cursor rects almost certainly should have changed. The tooltips
538 // might change even when the rects don't change. 540 // might change even when the rects don't change.
539 [field_ resetFieldEditorFrameIfNeeded]; 541 [field_ resetFieldEditorFrameIfNeeded];
540 [field_ updateCursorAndToolTipRects]; 542 [field_ updateCursorAndToolTipRects];
541 543
542 [field_ setNeedsDisplay:YES]; 544 [field_ setNeedsDisplay:YES];
543 } 545 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698