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

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

Issue 10985069: [test fixlet] Add tests for the zoom icon in the location bar on GTK. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: view IDs Created 8 years, 2 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
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/location_bar_view_mac.h" 5 #import "chrome/browser/ui/cocoa/location_bar/location_bar_view_mac.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/command_line.h" 8 #include "base/command_line.h"
9 #include "base/message_loop.h" 9 #include "base/message_loop.h"
10 #include "base/stl_util.h" 10 #include "base/stl_util.h"
(...skipping 30 matching lines...) Expand all
41 #import "chrome/browser/ui/cocoa/location_bar/ev_bubble_decoration.h" 41 #import "chrome/browser/ui/cocoa/location_bar/ev_bubble_decoration.h"
42 #import "chrome/browser/ui/cocoa/location_bar/keyword_hint_decoration.h" 42 #import "chrome/browser/ui/cocoa/location_bar/keyword_hint_decoration.h"
43 #import "chrome/browser/ui/cocoa/location_bar/location_icon_decoration.h" 43 #import "chrome/browser/ui/cocoa/location_bar/location_icon_decoration.h"
44 #import "chrome/browser/ui/cocoa/location_bar/page_action_decoration.h" 44 #import "chrome/browser/ui/cocoa/location_bar/page_action_decoration.h"
45 #import "chrome/browser/ui/cocoa/location_bar/plus_decoration.h" 45 #import "chrome/browser/ui/cocoa/location_bar/plus_decoration.h"
46 #import "chrome/browser/ui/cocoa/location_bar/selected_keyword_decoration.h" 46 #import "chrome/browser/ui/cocoa/location_bar/selected_keyword_decoration.h"
47 #import "chrome/browser/ui/cocoa/location_bar/star_decoration.h" 47 #import "chrome/browser/ui/cocoa/location_bar/star_decoration.h"
48 #import "chrome/browser/ui/cocoa/location_bar/web_intents_button_decoration.h" 48 #import "chrome/browser/ui/cocoa/location_bar/web_intents_button_decoration.h"
49 #import "chrome/browser/ui/cocoa/location_bar/zoom_decoration.h" 49 #import "chrome/browser/ui/cocoa/location_bar/zoom_decoration.h"
50 #import "chrome/browser/ui/cocoa/omnibox/omnibox_view_mac.h" 50 #import "chrome/browser/ui/cocoa/omnibox/omnibox_view_mac.h"
51 #import "chrome/browser/ui/cocoa/view_id_util.h"
51 #include "chrome/browser/ui/content_settings/content_setting_bubble_model.h" 52 #include "chrome/browser/ui/content_settings/content_setting_bubble_model.h"
52 #include "chrome/browser/ui/content_settings/content_setting_image_model.h" 53 #include "chrome/browser/ui/content_settings/content_setting_image_model.h"
53 #include "chrome/browser/ui/intents/web_intent_picker_controller.h" 54 #include "chrome/browser/ui/intents/web_intent_picker_controller.h"
54 #include "chrome/browser/ui/omnibox/location_bar_util.h" 55 #include "chrome/browser/ui/omnibox/location_bar_util.h"
55 #import "chrome/browser/ui/omnibox/omnibox_popup_model.h" 56 #import "chrome/browser/ui/omnibox/omnibox_popup_model.h"
56 #include "chrome/browser/ui/tab_contents/tab_contents.h" 57 #include "chrome/browser/ui/tab_contents/tab_contents.h"
57 #include "chrome/browser/ui/zoom/zoom_controller.h" 58 #include "chrome/browser/ui/zoom/zoom_controller.h"
58 #include "chrome/common/chrome_notification_types.h" 59 #include "chrome/common/chrome_notification_types.h"
59 #include "chrome/common/chrome_switches.h" 60 #include "chrome/common/chrome_switches.h"
60 #include "chrome/common/extensions/extension.h" 61 #include "chrome/common/extensions/extension.h"
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
109 new KeywordHintDecoration(OmniboxViewMac::GetFieldFont())), 110 new KeywordHintDecoration(OmniboxViewMac::GetFieldFont())),
110 web_intents_button_decoration_( 111 web_intents_button_decoration_(
111 new WebIntentsButtonDecoration(this, OmniboxViewMac::GetFieldFont())), 112 new WebIntentsButtonDecoration(this, OmniboxViewMac::GetFieldFont())),
112 profile_(profile), 113 profile_(profile),
113 browser_(browser), 114 browser_(browser),
114 toolbar_model_(toolbar_model), 115 toolbar_model_(toolbar_model),
115 transition_(content::PageTransitionFromInt( 116 transition_(content::PageTransitionFromInt(
116 content::PAGE_TRANSITION_TYPED | 117 content::PAGE_TRANSITION_TYPED |
117 content::PAGE_TRANSITION_FROM_ADDRESS_BAR)), 118 content::PAGE_TRANSITION_FROM_ADDRESS_BAR)),
118 weak_ptr_factory_(this) { 119 weak_ptr_factory_(this) {
120 view_id_util::SetID(zoom_decoration_, VIEW_ID_ZOOM_BUTTON);
119 if (extensions::switch_utils::IsActionBoxEnabled()) { 121 if (extensions::switch_utils::IsActionBoxEnabled()) {
120 plus_decoration_.reset(new PlusDecoration(this, browser_)); 122 plus_decoration_.reset(new PlusDecoration(this, browser_));
121 } 123 }
122 124
123 for (size_t i = 0; i < CONTENT_SETTINGS_NUM_TYPES; ++i) { 125 for (size_t i = 0; i < CONTENT_SETTINGS_NUM_TYPES; ++i) {
124 DCHECK_EQ(i, content_setting_decorations_.size()); 126 DCHECK_EQ(i, content_setting_decorations_.size());
125 ContentSettingsType type = static_cast<ContentSettingsType>(i); 127 ContentSettingsType type = static_cast<ContentSettingsType>(i);
126 content_setting_decorations_.push_back( 128 content_setting_decorations_.push_back(
127 new ContentSettingDecoration(type, this, profile_)); 129 new ContentSettingDecoration(type, this, profile_));
128 } 130 }
(...skipping 651 matching lines...) Expand 10 before | Expand all | Expand 10 after
780 visible = false; 782 visible = false;
781 star_decoration_->SetVisible(visible); 783 star_decoration_->SetVisible(visible);
782 } 784 }
783 785
784 void LocationBarViewMac::UpdatePlusDecorationVisibility() { 786 void LocationBarViewMac::UpdatePlusDecorationVisibility() {
785 if (extensions::switch_utils::IsActionBoxEnabled()) { 787 if (extensions::switch_utils::IsActionBoxEnabled()) {
786 // If the action box is enabled, hide it when input is in progress. 788 // If the action box is enabled, hide it when input is in progress.
787 plus_decoration_->SetVisible(!toolbar_model_->input_in_progress()); 789 plus_decoration_->SetVisible(!toolbar_model_->input_in_progress());
788 } 790 }
789 } 791 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698