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

Side by Side Diff: chrome/browser/instant/instant_loader.cc

Issue 11555033: Adding local html page used in Instant Extended mode when instant is disabled or unavailable. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Created 8 years 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
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/instant/instant_loader.h" 5 #include "chrome/browser/instant/instant_loader.h"
6 6
7 #include "chrome/browser/content_settings/tab_specific_content_settings.h" 7 #include "chrome/browser/content_settings/tab_specific_content_settings.h"
8 #include "chrome/browser/extensions/api/web_navigation/web_navigation_api.h" 8 #include "chrome/browser/extensions/api/web_navigation/web_navigation_api.h"
9 #include "chrome/browser/favicon/favicon_tab_helper.h" 9 #include "chrome/browser/favicon/favicon_tab_helper.h"
10 #include "chrome/browser/history/history_tab_helper.h" 10 #include "chrome/browser/history/history_tab_helper.h"
(...skipping 210 matching lines...) Expand 10 before | Expand all | Expand 10 after
221 content::WebContents* InstantLoader::ReleaseContents() { 221 content::WebContents* InstantLoader::ReleaseContents() {
222 CleanupPreviewContents(); 222 CleanupPreviewContents();
223 return contents_.release(); 223 return contents_.release();
224 } 224 }
225 225
226 void InstantLoader::DidNavigate( 226 void InstantLoader::DidNavigate(
227 const history::HistoryAddPageArgs& add_page_args) { 227 const history::HistoryAddPageArgs& add_page_args) {
228 last_navigation_ = add_page_args; 228 last_navigation_ = add_page_args;
229 } 229 }
230 230
231 bool InstantLoader::IsLoadingLocalOmniboxPopupURL() const {
232 return instant_url_ == InstantController::kLocalOmniboxPopupURL;
233 }
234
231 void InstantLoader::Update(const string16& text, 235 void InstantLoader::Update(const string16& text,
232 size_t selection_start, 236 size_t selection_start,
233 size_t selection_end, 237 size_t selection_end,
234 bool verbatim) { 238 bool verbatim) {
235 last_navigation_ = history::HistoryAddPageArgs(); 239 last_navigation_ = history::HistoryAddPageArgs();
236 client_.Update(text, selection_start, selection_end, verbatim); 240 client_.Update(text, selection_start, selection_end, verbatim);
237 } 241 }
238 242
239 void InstantLoader::Submit(const string16& text) { 243 void InstantLoader::Submit(const string16& text) {
240 client_.Submit(text); 244 client_.Submit(text);
(...skipping 172 matching lines...) Expand 10 before | Expand all | Expand 10 after
413 content::WebContents* new_contents) { 417 content::WebContents* new_contents) {
414 DCHECK_EQ(old_contents, contents()); 418 DCHECK_EQ(old_contents, contents());
415 CleanupPreviewContents(); 419 CleanupPreviewContents();
416 // We release here without deleting so that the caller still has the 420 // We release here without deleting so that the caller still has the
417 // responsibility for deleting the WebContents. 421 // responsibility for deleting the WebContents.
418 ignore_result(contents_.release()); 422 ignore_result(contents_.release());
419 contents_.reset(new_contents); 423 contents_.reset(new_contents);
420 SetupPreviewContents(); 424 SetupPreviewContents();
421 controller_->SwappedWebContents(); 425 controller_->SwappedWebContents();
422 } 426 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698