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

Side by Side Diff: chrome/browser/ui/search/search_tab_helper.cc

Issue 292123015: Remove WebContents::IsActiveEntry from Instant Extended and from WebContents. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: style Created 6 years, 6 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 #include "chrome/browser/ui/search/search_tab_helper.h" 5 #include "chrome/browser/ui/search/search_tab_helper.h"
6 6
7 #include <set> 7 #include <set>
8 8
9 #include "base/memory/scoped_ptr.h" 9 #include "base/memory/scoped_ptr.h"
10 #include "base/metrics/histogram.h" 10 #include "base/metrics/histogram.h"
(...skipping 341 matching lines...) Expand 10 before | Expand all | Expand 10 after
352 entry); 352 entry);
353 if (delegate_ && model_.instant_support() == INSTANT_SUPPORT_NO) 353 if (delegate_ && model_.instant_support() == INSTANT_SUPPORT_NO)
354 delegate_->OnWebContentsInstantSupportDisabled(web_contents_); 354 delegate_->OnWebContentsInstantSupportDisabled(web_contents_);
355 return; 355 return;
356 } 356 }
357 357
358 model_.SetInstantSupportState(INSTANT_SUPPORT_UNKNOWN); 358 model_.SetInstantSupportState(INSTANT_SUPPORT_UNKNOWN);
359 model_.SetVoiceSearchSupported(false); 359 model_.SetVoiceSearchSupported(false);
360 chrome::SetInstantSupportStateInNavigationEntry(model_.instant_support(), 360 chrome::SetInstantSupportStateInNavigationEntry(model_.instant_support(),
361 entry); 361 entry);
362
363 if (InInstantProcess(profile(), web_contents_))
364 ipc_router_.OnNavigationEntryCommitted();
362 } 365 }
363 366
364 void SearchTabHelper::OnInstantSupportDetermined(bool supports_instant) { 367 void SearchTabHelper::OnInstantSupportDetermined(bool supports_instant) {
365 InstantSupportChanged(supports_instant); 368 InstantSupportChanged(supports_instant);
366 } 369 }
367 370
368 void SearchTabHelper::OnSetVoiceSearchSupport(bool supports_voice_search) { 371 void SearchTabHelper::OnSetVoiceSearchSupport(bool supports_voice_search) {
369 model_.SetVoiceSearchSupported(supports_voice_search); 372 model_.SetVoiceSearchSupported(supports_voice_search);
370 } 373 }
371 374
(...skipping 212 matching lines...) Expand 10 before | Expand all | Expand 10 after
584 587
585 bool SearchTabHelper::IsInputInProgress() const { 588 bool SearchTabHelper::IsInputInProgress() const {
586 OmniboxView* omnibox = GetOmniboxView(); 589 OmniboxView* omnibox = GetOmniboxView();
587 return !model_.mode().is_ntp() && omnibox && 590 return !model_.mode().is_ntp() && omnibox &&
588 omnibox->model()->focus_state() == OMNIBOX_FOCUS_VISIBLE; 591 omnibox->model()->focus_state() == OMNIBOX_FOCUS_VISIBLE;
589 } 592 }
590 593
591 OmniboxView* SearchTabHelper::GetOmniboxView() const { 594 OmniboxView* SearchTabHelper::GetOmniboxView() const {
592 return delegate_ ? delegate_->GetOmniboxView() : NULL; 595 return delegate_ ? delegate_->GetOmniboxView() : NULL;
593 } 596 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/search/search_ipc_router_unittest.cc ('k') | chrome/browser/ui/search/search_tab_helper_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698