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

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

Issue 11416187: Commit instant loader when the instant page navigates away from instant URL. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Fixing commit for cross process navigation. 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_client.h" 5 #include "chrome/browser/instant/instant_client.h"
6 6
7 #include "chrome/common/render_messages.h" 7 #include "chrome/common/render_messages.h"
8 #include "content/public/browser/web_contents.h" 8 #include "content/public/browser/web_contents.h"
9 9
10 InstantClient::Delegate::~Delegate() { 10 InstantClient::Delegate::~Delegate() {
(...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after
94 StopCapturingKeyStrokes); 94 StopCapturingKeyStrokes);
95 IPC_MESSAGE_UNHANDLED(handled = false) 95 IPC_MESSAGE_UNHANDLED(handled = false)
96 IPC_END_MESSAGE_MAP() 96 IPC_END_MESSAGE_MAP()
97 return handled; 97 return handled;
98 } 98 }
99 99
100 void InstantClient::RenderViewGone(base::TerminationStatus status) { 100 void InstantClient::RenderViewGone(base::TerminationStatus status) {
101 delegate_->RenderViewGone(); 101 delegate_->RenderViewGone();
102 } 102 }
103 103
104 void InstantClient::DidCommitProvisionalLoadForFrame(
105 int64 frame_id,
106 bool is_main_frame,
107 const GURL& url,
108 content::PageTransition transition_type,
109 content::RenderViewHost* render_view_host) {
110 if (!is_main_frame)
111 return;
112 delegate_->AboutToNavigateMainFrame(url);
113 }
114
104 void InstantClient::SetSuggestions( 115 void InstantClient::SetSuggestions(
105 int page_id, 116 int page_id,
106 const std::vector<InstantSuggestion>& suggestions) { 117 const std::vector<InstantSuggestion>& suggestions) {
107 if (web_contents()->IsActiveEntry(page_id)) 118 if (web_contents()->IsActiveEntry(page_id))
108 delegate_->SetSuggestions(suggestions); 119 delegate_->SetSuggestions(suggestions);
109 } 120 }
110 121
111 void InstantClient::InstantSupportDetermined(int page_id, bool result) { 122 void InstantClient::InstantSupportDetermined(int page_id, bool result) {
112 if (web_contents()->IsActiveEntry(page_id)) 123 if (web_contents()->IsActiveEntry(page_id))
113 delegate_->InstantSupportDetermined(result); 124 delegate_->InstantSupportDetermined(result);
114 } 125 }
115 126
116 void InstantClient::ShowInstantPreview(int page_id, 127 void InstantClient::ShowInstantPreview(int page_id,
117 InstantShownReason reason, 128 InstantShownReason reason,
118 int height, 129 int height,
119 InstantSizeUnits units) { 130 InstantSizeUnits units) {
120 if (web_contents()->IsActiveEntry(page_id)) 131 if (web_contents()->IsActiveEntry(page_id))
121 delegate_->ShowInstantPreview(reason, height, units); 132 delegate_->ShowInstantPreview(reason, height, units);
122 } 133 }
123 134
124 void InstantClient::StartCapturingKeyStrokes(int page_id) { 135 void InstantClient::StartCapturingKeyStrokes(int page_id) {
125 if (web_contents()->IsActiveEntry(page_id)) 136 if (web_contents()->IsActiveEntry(page_id))
126 delegate_->StartCapturingKeyStrokes(); 137 delegate_->StartCapturingKeyStrokes();
127 } 138 }
128 139
129 void InstantClient::StopCapturingKeyStrokes(int page_id) { 140 void InstantClient::StopCapturingKeyStrokes(int page_id) {
130 if (web_contents()->IsActiveEntry(page_id)) 141 if (web_contents()->IsActiveEntry(page_id))
131 delegate_->StopCapturingKeyStrokes(); 142 delegate_->StopCapturingKeyStrokes();
132 } 143 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698