| 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/command_line.h" | 9 #include "base/command_line.h" |
| 10 #include "base/message_loop.h" | 10 #include "base/message_loop.h" |
| (...skipping 898 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 909 void BrowserPluginGuest::DidCommitProvisionalLoadForFrame( | 909 void BrowserPluginGuest::DidCommitProvisionalLoadForFrame( |
| 910 int64 frame_id, | 910 int64 frame_id, |
| 911 bool is_main_frame, | 911 bool is_main_frame, |
| 912 const GURL& url, | 912 const GURL& url, |
| 913 PageTransition transition_type, | 913 PageTransition transition_type, |
| 914 RenderViewHost* render_view_host) { | 914 RenderViewHost* render_view_host) { |
| 915 // Inform its embedder of the updated URL. | 915 // Inform its embedder of the updated URL. |
| 916 BrowserPluginMsg_LoadCommit_Params params; | 916 BrowserPluginMsg_LoadCommit_Params params; |
| 917 params.url = url; | 917 params.url = url; |
| 918 params.is_top_level = is_main_frame; | 918 params.is_top_level = is_main_frame; |
| 919 params.current_entry_index = | |
| 920 GetWebContents()->GetController().GetCurrentEntryIndex(); | |
| 921 params.entry_count = | |
| 922 GetWebContents()->GetController().GetEntryCount(); | |
| 923 SendMessageToEmbedder( | 919 SendMessageToEmbedder( |
| 924 new BrowserPluginMsg_LoadCommit(instance_id(), params)); | 920 new BrowserPluginMsg_LoadCommit(instance_id(), params)); |
| 925 RecordAction(UserMetricsAction("BrowserPlugin.Guest.DidNavigate")); | 921 RecordAction(UserMetricsAction("BrowserPlugin.Guest.DidNavigate")); |
| 926 } | 922 } |
| 927 | 923 |
| 928 void BrowserPluginGuest::DidStopLoading(RenderViewHost* render_view_host) { | 924 void BrowserPluginGuest::DidStopLoading(RenderViewHost* render_view_host) { |
| 929 bool disable_dragdrop = true; | 925 bool disable_dragdrop = true; |
| 930 #if defined(OS_LINUX) || defined(OS_MACOSX) | 926 #if defined(OS_LINUX) || defined(OS_MACOSX) |
| 931 if (CommandLine::ForCurrentProcess()->HasSwitch( | 927 if (CommandLine::ForCurrentProcess()->HasSwitch( |
| 932 switches::kEnableBrowserPluginDragDrop)) | 928 switches::kEnableBrowserPluginDragDrop)) |
| (...skipping 661 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1594 base::Value::CreateStringValue(request_method)); | 1590 base::Value::CreateStringValue(request_method)); |
| 1595 request_info.Set(browser_plugin::kURL, base::Value::CreateStringValue(url)); | 1591 request_info.Set(browser_plugin::kURL, base::Value::CreateStringValue(url)); |
| 1596 | 1592 |
| 1597 SendMessageToEmbedder( | 1593 SendMessageToEmbedder( |
| 1598 new BrowserPluginMsg_RequestPermission(instance_id(), | 1594 new BrowserPluginMsg_RequestPermission(instance_id(), |
| 1599 BrowserPluginPermissionTypeDownload, permission_request_id, | 1595 BrowserPluginPermissionTypeDownload, permission_request_id, |
| 1600 request_info)); | 1596 request_info)); |
| 1601 } | 1597 } |
| 1602 | 1598 |
| 1603 } // namespace content | 1599 } // namespace content |
| OLD | NEW |