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

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

Issue 12001002: InstantExtended: Transient naventry for preview. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase. Created 7 years, 10 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
« no previous file with comments | « chrome/browser/instant/instant_loader.h ('k') | chrome/browser/instant/instant_overlay.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
59 instant_url_ = instant_url; 59 instant_url_ = instant_url;
60 on_stale_callback_ = on_stale_callback; 60 on_stale_callback_ = on_stale_callback;
61 } 61 }
62 62
63 void InstantLoader::Load() { 63 void InstantLoader::Load() {
64 DVLOG(1) << "LoadURL: " << instant_url_; 64 DVLOG(1) << "LoadURL: " << instant_url_;
65 contents_->GetController().LoadURL( 65 contents_->GetController().LoadURL(
66 instant_url_, content::Referrer(), 66 instant_url_, content::Referrer(),
67 content::PAGE_TRANSITION_GENERATED, kInstantHeader); 67 content::PAGE_TRANSITION_GENERATED, kInstantHeader);
68 contents_->WasHidden(); 68 contents_->WasHidden();
69 const content::NavigationEntry* entry =
70 contents_->GetController().GetVisibleEntry();
71 base_navigation_entry_.reset(content::NavigationEntry::Create(*entry));
69 stale_page_timer_.Start( 72 stale_page_timer_.Start(
70 FROM_HERE, 73 FROM_HERE,
71 base::TimeDelta::FromMilliseconds(kStalePageTimeoutMS), 74 base::TimeDelta::FromMilliseconds(kStalePageTimeoutMS),
72 on_stale_callback_); 75 on_stale_callback_);
73 } 76 }
74 77
75 void InstantLoader::SetContents(scoped_ptr<content::WebContents> new_contents) { 78 void InstantLoader::SetContents(scoped_ptr<content::WebContents> new_contents) {
76 contents_.reset(new_contents.release()); 79 contents_.reset(new_contents.release());
77 contents_->SetDelegate(this); 80 contents_->SetDelegate(this);
78 81
(...skipping 134 matching lines...) Expand 10 before | Expand all | Expand 10 after
213 216
214 bool InstantLoader::OnGoToEntryOffset(int /* offset */) { 217 bool InstantLoader::OnGoToEntryOffset(int /* offset */) {
215 return false; 218 return false;
216 } 219 }
217 220
218 content::WebContents* InstantLoader::OpenURLFromTab( 221 content::WebContents* InstantLoader::OpenURLFromTab(
219 content::WebContents* source, 222 content::WebContents* source,
220 const content::OpenURLParams& params) { 223 const content::OpenURLParams& params) {
221 return delegate_->OpenURLFromTab(source, params); 224 return delegate_->OpenURLFromTab(source, params);
222 } 225 }
OLDNEW
« no previous file with comments | « chrome/browser/instant/instant_loader.h ('k') | chrome/browser/instant/instant_overlay.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698