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

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

Issue 287543002: Remove origin chip v1 and "hide on input" v2 behavior. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
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 | Annotate | Revision Log
OLDNEW
1 // Copyright 2012 The Chromium Authors. All rights reserved. 1 // Copyright 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/message_loop.h" 9 #include "base/message_loop/message_loop.h"
10 #include "base/prefs/pref_service.h" 10 #include "base/prefs/pref_service.h"
(...skipping 145 matching lines...) Expand 10 before | Expand all | Expand 10 after
156 edit_bookmarks_enabled_.Init( 156 edit_bookmarks_enabled_.Init(
157 prefs::kEditBookmarksEnabled, profile->GetPrefs(), 157 prefs::kEditBookmarksEnabled, profile->GetPrefs(),
158 base::Bind(&LocationBarViewMac::OnEditBookmarksEnabledChanged, 158 base::Bind(&LocationBarViewMac::OnEditBookmarksEnabledChanged,
159 base::Unretained(this))); 159 base::Unretained(this)));
160 160
161 browser_->search_model()->AddObserver(this); 161 browser_->search_model()->AddObserver(this);
162 162
163 [[field_ cell] setIsPopupMode: 163 [[field_ cell] setIsPopupMode:
164 !browser->SupportsWindowFeature(Browser::FEATURE_TABSTRIP)]; 164 !browser->SupportsWindowFeature(Browser::FEATURE_TABSTRIP)];
165 165
166 if (chrome::ShouldDisplayOriginChipV2()) 166 if (chrome::ShouldDisplayOriginChip())
167 origin_chip_decoration_.reset(new OriginChipDecoration( 167 origin_chip_decoration_.reset(new OriginChipDecoration(
168 this, location_icon_decoration_.get())); 168 this, location_icon_decoration_.get()));
169 } 169 }
170 170
171 LocationBarViewMac::~LocationBarViewMac() { 171 LocationBarViewMac::~LocationBarViewMac() {
172 // Disconnect from cell in case it outlives us. 172 // Disconnect from cell in case it outlives us.
173 [[field_ cell] clearDecorations]; 173 [[field_ cell] clearDecorations];
174 174
175 browser_->search_model()->RemoveObserver(this); 175 browser_->search_model()->RemoveObserver(this);
176 } 176 }
(...skipping 615 matching lines...) Expand 10 before | Expand all | Expand 10 after
792 } 792 }
793 793
794 bool LocationBarViewMac::UpdateMicSearchDecorationVisibility() { 794 bool LocationBarViewMac::UpdateMicSearchDecorationVisibility() {
795 bool is_visible = !GetToolbarModel()->input_in_progress() && 795 bool is_visible = !GetToolbarModel()->input_in_progress() &&
796 browser_->search_model()->voice_search_supported(); 796 browser_->search_model()->voice_search_supported();
797 if (mic_search_decoration_->IsVisible() == is_visible) 797 if (mic_search_decoration_->IsVisible() == is_visible)
798 return false; 798 return false;
799 mic_search_decoration_->SetVisible(is_visible); 799 mic_search_decoration_->SetVisible(is_visible);
800 return true; 800 return true;
801 } 801 }
OLDNEW
« no previous file with comments | « chrome/browser/search/search_unittest.cc ('k') | chrome/browser/ui/cocoa/location_bar/location_icon_decoration.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698