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

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

Issue 14043009: Fall back to local page if online NTP fails to load. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Cleanup Created 7 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 #include "chrome/browser/ui/search/search_tab_helper.h" 5 #include "chrome/browser/ui/search/search_tab_helper.h"
6 6
7 #include "chrome/browser/search/search.h" 7 #include "chrome/browser/search/search.h"
8 #include "chrome/common/render_messages.h" 8 #include "chrome/common/render_messages.h"
9 #include "chrome/common/url_constants.h" 9 #include "chrome/common/url_constants.h"
10 #include "content/public/browser/navigation_entry.h" 10 #include "content/public/browser/navigation_entry.h"
(...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after
108 if (web_contents()->IsActiveEntry(page_id)) 108 if (web_contents()->IsActiveEntry(page_id))
109 model_.SetTopBarsVisible(true); 109 model_.SetTopBarsVisible(true);
110 } 110 }
111 111
112 void SearchTabHelper::OnSearchBoxHideBars(int page_id) { 112 void SearchTabHelper::OnSearchBoxHideBars(int page_id) {
113 if (web_contents()->IsActiveEntry(page_id)) { 113 if (web_contents()->IsActiveEntry(page_id)) {
114 model_.SetTopBarsVisible(false); 114 model_.SetTopBarsVisible(false);
115 Send(new ChromeViewMsg_SearchBoxBarsHidden(routing_id())); 115 Send(new ChromeViewMsg_SearchBoxBarsHidden(routing_id()));
116 } 116 }
117 } 117 }
118
119 void SearchTabHelper::RedirectingToLocal() {
120 model_.SetMode(
121 SearchMode(SearchMode::MODE_DEFAULT, SearchMode::ORIGIN_DEFAULT));
122 }
OLDNEW
« chrome/browser/ui/search/instant_page.cc ('K') | « chrome/browser/ui/search/search_tab_helper.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698