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 #ifndef CONTENT_RENDERER_BROWSER_PLUGIN_BROWSER_PLUGIN_H_ | 5 #ifndef CONTENT_RENDERER_BROWSER_PLUGIN_BROWSER_PLUGIN_H_ |
6 #define CONTENT_RENDERER_BROWSER_PLUGIN_BROWSER_PLUGIN_H_ | 6 #define CONTENT_RENDERER_BROWSER_PLUGIN_BROWSER_PLUGIN_H_ |
7 | 7 |
8 #include "third_party/WebKit/Source/WebKit/chromium/public/WebPlugin.h" | 8 #include "third_party/WebKit/Source/WebKit/chromium/public/WebPlugin.h" |
9 | 9 |
10 #include "base/memory/scoped_ptr.h" | 10 #include "base/memory/scoped_ptr.h" |
11 #include "base/sequenced_task_runner_helpers.h" | 11 #include "base/sequenced_task_runner_helpers.h" |
12 #if defined(OS_WIN) | 12 #if defined(OS_WIN) |
13 #include "base/shared_memory.h" | 13 #include "base/shared_memory.h" |
14 #endif | 14 #endif |
15 #include "content/renderer/browser_plugin/browser_plugin_backing_store.h" | 15 #include "content/renderer/browser_plugin/browser_plugin_backing_store.h" |
16 #include "content/renderer/browser_plugin/browser_plugin_bindings.h" | 16 #include "content/renderer/browser_plugin/browser_plugin_bindings.h" |
17 #include "content/renderer/render_view_impl.h" | 17 #include "content/renderer/render_view_impl.h" |
18 #include "third_party/WebKit/Source/WebKit/chromium/public/WebDragStatus.h" | 18 #include "third_party/WebKit/Source/WebKit/chromium/public/WebDragStatus.h" |
19 | 19 |
20 struct BrowserPluginHostMsg_ResizeGuest_Params; | 20 struct BrowserPluginHostMsg_ResizeGuest_Params; |
21 struct BrowserPluginMsg_DidNavigate_Params; | 21 struct BrowserPluginMsg_LoadCommit_Params; |
22 struct BrowserPluginMsg_UpdateRect_Params; | 22 struct BrowserPluginMsg_UpdateRect_Params; |
23 | 23 |
24 namespace content { | 24 namespace content { |
25 | 25 |
26 class BrowserPluginManager; | 26 class BrowserPluginManager; |
27 class MockBrowserPlugin; | 27 class MockBrowserPlugin; |
28 | 28 |
29 class CONTENT_EXPORT BrowserPlugin : | 29 class CONTENT_EXPORT BrowserPlugin : |
30 NON_EXPORTED_BASE(public WebKit::WebPlugin) { | 30 NON_EXPORTED_BASE(public WebKit::WebPlugin) { |
31 public: | 31 public: |
(...skipping 19 matching lines...) Expand all Loading... |
51 // set appropriately to indicate the failure reason. | 51 // set appropriately to indicate the failure reason. |
52 bool SetPartitionAttribute(const std::string& partition_id, | 52 bool SetPartitionAttribute(const std::string& partition_id, |
53 std::string& error_message); | 53 std::string& error_message); |
54 | 54 |
55 // Inform the BrowserPlugin to update its backing store with the pixels in | 55 // Inform the BrowserPlugin to update its backing store with the pixels in |
56 // its damage buffer. | 56 // its damage buffer. |
57 void UpdateRect(int message_id, | 57 void UpdateRect(int message_id, |
58 const BrowserPluginMsg_UpdateRect_Params& params); | 58 const BrowserPluginMsg_UpdateRect_Params& params); |
59 // Inform the BrowserPlugin that its guest has crashed. | 59 // Inform the BrowserPlugin that its guest has crashed. |
60 void GuestCrashed(); | 60 void GuestCrashed(); |
61 // Informs the BrowserPlugin that the guest has navigated to a new URL. | 61 // Inform the BrowserPlugin that the guest has navigated to a new URL. |
62 void DidNavigate(const BrowserPluginMsg_DidNavigate_Params& params); | 62 void LoadCommit(const BrowserPluginMsg_LoadCommit_Params& params); |
63 // Inform the BrowserPlugin that the guest has started loading a new page. | 63 // Inform the BrowserPlugin that the guest has started loading a new page. |
64 void LoadStart(const GURL& url, bool is_top_level); | 64 void LoadStart(const GURL& url, bool is_top_level); |
| 65 // Inform the BrowserPlugin that the guest has finished loading a new page. |
| 66 void LoadStop(); |
65 // Inform the BrowserPlugin that the guest has aborted loading a new page. | 67 // Inform the BrowserPlugin that the guest has aborted loading a new page. |
66 void LoadAbort(const GURL& url, bool is_top_level, const std::string& type); | 68 void LoadAbort(const GURL& url, bool is_top_level, const std::string& type); |
67 // Inform the BrowserPlugin that the guest has redirected a navigation. | 69 // Inform the BrowserPlugin that the guest has redirected a navigation. |
68 void LoadRedirect(const GURL& old_url, | 70 void LoadRedirect(const GURL& old_url, |
69 const GURL& new_url, | 71 const GURL& new_url, |
70 bool is_top_level); | 72 bool is_top_level); |
71 // Tells the BrowserPlugin to advance the focus to the next (or previous) | 73 // Tells the BrowserPlugin to advance the focus to the next (or previous) |
72 // element. | 74 // element. |
73 void AdvanceFocus(bool reverse); | 75 void AdvanceFocus(bool reverse); |
74 | 76 |
(...skipping 147 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
222 // the changes are not always obvious. For example, there is a maximum | 224 // the changes are not always obvious. For example, there is a maximum |
223 // number of entries and earlier ones will automatically be pruned. | 225 // number of entries and earlier ones will automatically be pruned. |
224 int current_nav_entry_index_; | 226 int current_nav_entry_index_; |
225 int nav_entry_count_; | 227 int nav_entry_count_; |
226 DISALLOW_COPY_AND_ASSIGN(BrowserPlugin); | 228 DISALLOW_COPY_AND_ASSIGN(BrowserPlugin); |
227 }; | 229 }; |
228 | 230 |
229 } // namespace content | 231 } // namespace content |
230 | 232 |
231 #endif // CONTENT_RENDERER_BROWSER_PLUGIN_BROWSER_PLUGIN_H_ | 233 #endif // CONTENT_RENDERER_BROWSER_PLUGIN_BROWSER_PLUGIN_H_ |
OLD | NEW |