OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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 CHROME_RENDERER_PLUGINS_CHROME_PLUGIN_PLACEHOLDER_H_ | 5 #ifndef CHROME_RENDERER_PLUGINS_CHROME_PLUGIN_PLACEHOLDER_H_ |
6 #define CHROME_RENDERER_PLUGINS_CHROME_PLUGIN_PLACEHOLDER_H_ | 6 #define CHROME_RENDERER_PLUGINS_CHROME_PLUGIN_PLACEHOLDER_H_ |
7 | 7 |
8 #include <stdint.h> | 8 #include <stdint.h> |
9 | 9 |
10 #include "base/macros.h" | 10 #include "base/macros.h" |
| 11 #include "chrome/common/prerender_types.h" |
11 #include "chrome/renderer/plugins/power_saver_info.h" | 12 #include "chrome/renderer/plugins/power_saver_info.h" |
12 #include "components/plugins/renderer/loadable_plugin_placeholder.h" | 13 #include "components/plugins/renderer/loadable_plugin_placeholder.h" |
13 #include "content/public/renderer/context_menu_client.h" | 14 #include "content/public/renderer/context_menu_client.h" |
14 #include "content/public/renderer/render_thread_observer.h" | 15 #include "content/public/renderer/render_thread_observer.h" |
15 | 16 |
16 enum class ChromeViewHostMsg_GetPluginInfo_Status; | 17 enum class ChromeViewHostMsg_GetPluginInfo_Status; |
17 | 18 |
18 class ChromePluginPlaceholder final | 19 class ChromePluginPlaceholder final |
19 : public plugins::LoadablePluginPlaceholder, | 20 : public plugins::LoadablePluginPlaceholder, |
20 public content::RenderThreadObserver, | 21 public content::RenderThreadObserver, |
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
85 | 86 |
86 // IPC message handlers: | 87 // IPC message handlers: |
87 #if defined(ENABLE_PLUGIN_INSTALLATION) | 88 #if defined(ENABLE_PLUGIN_INSTALLATION) |
88 void OnDidNotFindMissingPlugin(); | 89 void OnDidNotFindMissingPlugin(); |
89 void OnFoundMissingPlugin(const base::string16& plugin_name); | 90 void OnFoundMissingPlugin(const base::string16& plugin_name); |
90 void OnStartedDownloadingPlugin(); | 91 void OnStartedDownloadingPlugin(); |
91 void OnFinishedDownloadingPlugin(); | 92 void OnFinishedDownloadingPlugin(); |
92 void OnErrorDownloadingPlugin(const std::string& error); | 93 void OnErrorDownloadingPlugin(const std::string& error); |
93 void OnCancelledDownloadingPlugin(); | 94 void OnCancelledDownloadingPlugin(); |
94 #endif | 95 #endif |
| 96 void OnSetPrerenderMode(prerender::PrerenderMode mode); |
95 | 97 |
96 ChromeViewHostMsg_GetPluginInfo_Status status_; | 98 ChromeViewHostMsg_GetPluginInfo_Status status_; |
97 | 99 |
98 base::string16 title_; | 100 base::string16 title_; |
99 | 101 |
100 #if defined(ENABLE_PLUGIN_INSTALLATION) | 102 #if defined(ENABLE_PLUGIN_INSTALLATION) |
101 // |routing_id()| is the routing ID of our associated RenderView, but we have | 103 // |routing_id()| is the routing ID of our associated RenderView, but we have |
102 // a separate routing ID for messages specific to this placeholder. | 104 // a separate routing ID for messages specific to this placeholder. |
103 int32_t placeholder_routing_id_ = MSG_ROUTING_NONE; | 105 int32_t placeholder_routing_id_ = MSG_ROUTING_NONE; |
104 | 106 |
105 bool has_host_ = false; | 107 bool has_host_ = false; |
106 #endif | 108 #endif |
107 | 109 |
108 int context_menu_request_id_; // Nonzero when request pending. | 110 int context_menu_request_id_; // Nonzero when request pending. |
109 base::string16 plugin_name_; | 111 base::string16 plugin_name_; |
110 | 112 |
111 bool did_send_blocked_content_notification_; | 113 bool did_send_blocked_content_notification_; |
112 | 114 |
113 DISALLOW_COPY_AND_ASSIGN(ChromePluginPlaceholder); | 115 DISALLOW_COPY_AND_ASSIGN(ChromePluginPlaceholder); |
114 }; | 116 }; |
115 | 117 |
116 #endif // CHROME_RENDERER_PLUGINS_CHROME_PLUGIN_PLACEHOLDER_H_ | 118 #endif // CHROME_RENDERER_PLUGINS_CHROME_PLUGIN_PLACEHOLDER_H_ |
OLD | NEW |