Chromium Code Reviews| OLD | NEW |
|---|---|
| 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 "base/string_util.h" | 9 #include "base/string_util.h" |
| 10 #include "content/browser/browser_plugin/browser_plugin_guest_helper.h" | 10 #include "content/browser/browser_plugin/browser_plugin_guest_helper.h" |
| (...skipping 364 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 375 new BrowserPluginMsg_LoadRedirect( | 375 new BrowserPluginMsg_LoadRedirect( |
| 376 instance_id(), old_url, new_url, is_top_level)); | 376 instance_id(), old_url, new_url, is_top_level)); |
| 377 } | 377 } |
| 378 | 378 |
| 379 void BrowserPluginGuest::DidCommitProvisionalLoadForFrame( | 379 void BrowserPluginGuest::DidCommitProvisionalLoadForFrame( |
| 380 int64 frame_id, | 380 int64 frame_id, |
| 381 bool is_main_frame, | 381 bool is_main_frame, |
| 382 const GURL& url, | 382 const GURL& url, |
| 383 PageTransition transition_type, | 383 PageTransition transition_type, |
| 384 RenderViewHost* render_view_host) { | 384 RenderViewHost* render_view_host) { |
| 385 SendMessageToEmbedder( | |
| 386 new BrowserPluginMsg_NavigationStateUpdate( | |
| 387 instance_id(), | |
| 388 web_contents()->GetController().GetCurrentEntryIndex(), | |
| 389 web_contents()->GetController().GetEntryCount())); | |
|
Charlie Reis
2012/10/10 06:06:53
I think we should combine these two IPC messages i
Fady Samuel
2012/10/10 17:36:44
Done.
| |
| 385 // Inform its embedder of the updated URL. | 390 // Inform its embedder of the updated URL. |
| 386 if (is_main_frame) { | 391 if (is_main_frame) { |
| 387 SendMessageToEmbedder( | 392 SendMessageToEmbedder( |
| 388 new BrowserPluginMsg_DidNavigate( | 393 new BrowserPluginMsg_DidNavigate( |
| 389 instance_id(), | 394 instance_id(), |
| 390 url, | 395 url, |
| 391 render_view_host->GetProcess()->GetID())); | 396 render_view_host->GetProcess()->GetID())); |
| 392 RecordAction(UserMetricsAction("BrowserPlugin.Guest.DidNavigate")); | 397 RecordAction(UserMetricsAction("BrowserPlugin.Guest.DidNavigate")); |
| 393 } | 398 } |
| 394 } | 399 } |
| (...skipping 27 matching lines...) Expand all Loading... | |
| 422 break; | 427 break; |
| 423 } | 428 } |
| 424 } | 429 } |
| 425 | 430 |
| 426 void BrowserPluginGuest::SendMessageToEmbedder(IPC::Message* msg) { | 431 void BrowserPluginGuest::SendMessageToEmbedder(IPC::Message* msg) { |
| 427 DCHECK(embedder_render_process_host()); | 432 DCHECK(embedder_render_process_host()); |
| 428 embedder_render_process_host()->Send(msg); | 433 embedder_render_process_host()->Send(msg); |
| 429 } | 434 } |
| 430 | 435 |
| 431 } // namespace content | 436 } // namespace content |
| OLD | NEW |