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

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

Issue 11090068: When starting a provisional load include the parent frame ID in the IPC and pass it down the th WCO… (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: updatess Created 8 years, 2 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 (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 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/google/google_util.h" 7 #include "chrome/browser/google/google_util.h"
8 #include "chrome/browser/profiles/profile.h" 8 #include "chrome/browser/profiles/profile.h"
9 #include "chrome/browser/ui/search/search.h" 9 #include "chrome/browser/ui/search/search.h"
10 #include "chrome/common/url_constants.h" 10 #include "chrome/common/url_constants.h"
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after
81 // when "committed". This is because NTP is rendered natively so is faster 81 // when "committed". This is because NTP is rendered natively so is faster
82 // to render than the web contents and we need to coordinate the animations. 82 // to render than the web contents and we need to coordinate the animations.
83 if (IsNTP(url)) { 83 if (IsNTP(url)) {
84 ntp_load_state_ = WAITING_FOR_FRAME_ID; 84 ntp_load_state_ = WAITING_FOR_FRAME_ID;
85 UpdateModelBasedOnURL(url, ntp_load_state_, !is_initial_navigation_commit_); 85 UpdateModelBasedOnURL(url, ntp_load_state_, !is_initial_navigation_commit_);
86 } 86 }
87 } 87 }
88 88
89 void SearchTabHelper::DidStartProvisionalLoadForFrame( 89 void SearchTabHelper::DidStartProvisionalLoadForFrame(
90 int64 frame_id, 90 int64 frame_id,
91 int64 parent_frame_id,
91 bool is_main_frame, 92 bool is_main_frame,
92 const GURL& validated_url, 93 const GURL& validated_url,
93 bool is_error_page, 94 bool is_error_page,
94 content::RenderViewHost* render_view_host) { 95 content::RenderViewHost* render_view_host) {
95 if (ntp_load_state_ == WAITING_FOR_FRAME_ID && 96 if (ntp_load_state_ == WAITING_FOR_FRAME_ID &&
96 is_main_frame && IsNTP(validated_url)) { 97 is_main_frame && IsNTP(validated_url)) {
97 content::NavigationEntry* pending_entry = 98 content::NavigationEntry* pending_entry =
98 web_contents()->GetController().GetPendingEntry(); 99 web_contents()->GetController().GetPendingEntry();
99 if (pending_entry && IsNTP(pending_entry->GetURL())) { 100 if (pending_entry && IsNTP(pending_entry->GetURL())) {
100 ntp_load_state_ = WAITING_FOR_FRAME_LOAD; 101 ntp_load_state_ = WAITING_FOR_FRAME_LOAD;
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after
173 } 174 }
174 175
175 content::RenderWidgetHost* SearchTabHelper::GetRenderWidgetHost() { 176 content::RenderWidgetHost* SearchTabHelper::GetRenderWidgetHost() {
176 content::RenderWidgetHostView* rwhv = 177 content::RenderWidgetHostView* rwhv =
177 web_contents()->GetRenderWidgetHostView(); 178 web_contents()->GetRenderWidgetHostView();
178 return rwhv ? rwhv->GetRenderWidgetHost() : NULL; 179 return rwhv ? rwhv->GetRenderWidgetHost() : NULL;
179 } 180 }
180 181
181 } // namespace search 182 } // namespace search
182 } // namespace chrome 183 } // namespace chrome
OLDNEW
« no previous file with comments | « chrome/browser/ui/search/search_tab_helper.h ('k') | content/browser/browser_plugin/browser_plugin_guest.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698