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

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

Issue 12386019: Instant: Use only one hidden WebContents per profile. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 9 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.h" 9 #include "base/message_loop.h"
10 #include "base/prefs/pref_service.h" 10 #include "base/prefs/pref_service.h"
(...skipping 156 matching lines...) Expand 10 before | Expand all | Expand 10 after
167 [FirstRunBubbleController showForView:field_ 167 [FirstRunBubbleController showForView:field_
168 offset:kOffset 168 offset:kOffset
169 browser:browser_ 169 browser:browser_
170 profile:profile_]; 170 profile:profile_];
171 } 171 }
172 172
173 string16 LocationBarViewMac::GetInputString() const { 173 string16 LocationBarViewMac::GetInputString() const {
174 return location_input_; 174 return location_input_;
175 } 175 }
176 176
177 void LocationBarViewMac::SetInstantSuggestion(
178 const InstantSuggestion& suggestion) {
179 omnibox_view_->model()->SetInstantSuggestion(suggestion);
180 }
181
182 WindowOpenDisposition LocationBarViewMac::GetWindowOpenDisposition() const { 177 WindowOpenDisposition LocationBarViewMac::GetWindowOpenDisposition() const {
183 return disposition_; 178 return disposition_;
184 } 179 }
185 180
186 content::PageTransition LocationBarViewMac::GetPageTransition() const { 181 content::PageTransition LocationBarViewMac::GetPageTransition() const {
187 return transition_; 182 return transition_;
188 } 183 }
189 184
190 void LocationBarViewMac::AcceptInput() { 185 void LocationBarViewMac::AcceptInput() {
191 WindowOpenDisposition disposition = 186 WindowOpenDisposition disposition =
(...skipping 592 matching lines...) Expand 10 before | Expand all | Expand 10 after
784 if (!toolbar_model_->GetInputInProgress() && 779 if (!toolbar_model_->GetInputInProgress() &&
785 toolbar_model_->WouldReplaceSearchURLWithSearchTerms()) { 780 toolbar_model_->WouldReplaceSearchURLWithSearchTerms()) {
786 const TemplateURL* template_url = 781 const TemplateURL* template_url =
787 TemplateURLServiceFactory::GetForProfile(profile_)-> 782 TemplateURLServiceFactory::GetForProfile(profile_)->
788 GetDefaultSearchProvider(); 783 GetDefaultSearchProvider();
789 if (template_url) 784 if (template_url)
790 return template_url->short_name(); 785 return template_url->short_name();
791 } 786 }
792 return string16(); 787 return string16();
793 } 788 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698