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