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

Side by Side Diff: content/browser/browser_plugin/browser_plugin_guest.cc

Issue 10941042: Browser plugin: Implement loadStart and loadAbort events (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Merge with ToT 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 "content/browser/browser_plugin/browser_plugin_guest.h" 5 #include "content/browser/browser_plugin/browser_plugin_guest.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 8
9 #include "content/browser/browser_plugin/browser_plugin_guest_helper.h" 9 #include "content/browser/browser_plugin/browser_plugin_guest_helper.h"
10 #include "content/browser/browser_plugin/browser_plugin_host_factory.h" 10 #include "content/browser/browser_plugin/browser_plugin_host_factory.h"
(...skipping 249 matching lines...) Expand 10 before | Expand all | Expand 10 after
260 gfx::Rect screen_pos(initial_pos); 260 gfx::Rect screen_pos(initial_pos);
261 screen_pos.Offset(guest_rect_.origin()); 261 screen_pos.Offset(guest_rect_.origin());
262 static_cast<WebContentsImpl*>(web_contents())->ShowCreatedWidget(route_id, 262 static_cast<WebContentsImpl*>(web_contents())->ShowCreatedWidget(route_id,
263 screen_pos); 263 screen_pos);
264 } 264 }
265 265
266 void BrowserPluginGuest::SetCursor(const WebCursor& cursor) { 266 void BrowserPluginGuest::SetCursor(const WebCursor& cursor) {
267 cursor_ = cursor; 267 cursor_ = cursor;
268 } 268 }
269 269
270 void BrowserPluginGuest::DidStartProvisionalLoadForFrame(
271 int64 frame_id,
272 bool is_main_frame,
273 const GURL& validated_url,
274 bool is_error_page,
275 RenderViewHost* render_view_host) {
276 // Inform the embedder of the loadStart.
277 SendMessageToEmbedder(
278 new BrowserPluginMsg_LoadStart(instance_id(),
279 validated_url,
280 is_main_frame));
281 }
270 void BrowserPluginGuest::DidCommitProvisionalLoadForFrame( 282 void BrowserPluginGuest::DidCommitProvisionalLoadForFrame(
271 int64 frame_id, 283 int64 frame_id,
272 bool is_main_frame, 284 bool is_main_frame,
273 const GURL& url, 285 const GURL& url,
274 PageTransition transition_type, 286 PageTransition transition_type,
275 RenderViewHost* render_view_host) { 287 RenderViewHost* render_view_host) {
276 // Inform its embedder of the updated URL. 288 // Inform its embedder of the updated URL.
277 if (is_main_frame) 289 if (is_main_frame)
278 SendMessageToEmbedder( 290 SendMessageToEmbedder(
279 new BrowserPluginMsg_DidNavigate( 291 new BrowserPluginMsg_DidNavigate(
(...skipping 17 matching lines...) Expand all
297 iter.Advance(); 309 iter.Advance();
298 } 310 }
299 } 311 }
300 312
301 void BrowserPluginGuest::SendMessageToEmbedder(IPC::Message* msg) { 313 void BrowserPluginGuest::SendMessageToEmbedder(IPC::Message* msg) {
302 DCHECK(embedder_render_process_host()); 314 DCHECK(embedder_render_process_host());
303 embedder_render_process_host()->Send(msg); 315 embedder_render_process_host()->Send(msg);
304 } 316 }
305 317
306 } // namespace content 318 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698