Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(146)

Side by Side Diff: chrome/renderer/plugins/chrome_plugin_placeholder.h

Issue 2143073002: Plugin Power Saver: Improve blocked tiny plugins behavior (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rename a variable again Created 4 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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"
(...skipping 19 matching lines...) Expand all
30 content::RenderFrame* render_frame, 30 content::RenderFrame* render_frame,
31 blink::WebLocalFrame* frame, 31 blink::WebLocalFrame* frame,
32 const blink::WebPluginParams& params, 32 const blink::WebPluginParams& params,
33 const content::WebPluginInfo& info, 33 const content::WebPluginInfo& info,
34 const std::string& identifier, 34 const std::string& identifier,
35 const base::string16& name, 35 const base::string16& name,
36 int resource_id, 36 int resource_id,
37 const base::string16& message, 37 const base::string16& message,
38 const PowerSaverInfo& power_saver_info); 38 const PowerSaverInfo& power_saver_info);
39 39
40 // Create a plugin placeholder that delays until sizing is known.
41 static ChromePluginPlaceholder* CreateDelayedPlugin(
42 content::RenderFrame* render_frame,
43 blink::WebLocalFrame* frame,
44 const blink::WebPluginParams& params,
45 const content::WebPluginInfo& info,
46 const std::string& identifier,
47 const base::string16& name,
48 const PowerSaverInfo& power_saver_info);
49
50 // Creates a new WebViewPlugin with a MissingPlugin as a delegate. 40 // Creates a new WebViewPlugin with a MissingPlugin as a delegate.
51 static ChromePluginPlaceholder* CreateLoadableMissingPlugin( 41 static ChromePluginPlaceholder* CreateLoadableMissingPlugin(
52 content::RenderFrame* render_frame, 42 content::RenderFrame* render_frame,
53 blink::WebLocalFrame* frame, 43 blink::WebLocalFrame* frame,
54 const blink::WebPluginParams& params); 44 const blink::WebPluginParams& params);
55 45
56 void SetStatus(ChromeViewHostMsg_GetPluginInfo_Status status); 46 void SetStatus(ChromeViewHostMsg_GetPluginInfo_Status status);
57 47
58 #if defined(ENABLE_PLUGIN_INSTALLATION) 48 #if defined(ENABLE_PLUGIN_INSTALLATION)
59 int32_t CreateRoutingId(); 49 int32_t CreateRoutingId();
60 #endif 50 #endif
61 51
62 private: 52 private:
63 ChromePluginPlaceholder(content::RenderFrame* render_frame, 53 ChromePluginPlaceholder(content::RenderFrame* render_frame,
64 blink::WebLocalFrame* frame, 54 blink::WebLocalFrame* frame,
65 const blink::WebPluginParams& params, 55 const blink::WebPluginParams& params,
66 const std::string& html_data, 56 const std::string& html_data,
67 const base::string16& title); 57 const base::string16& title);
68 ~ChromePluginPlaceholder() override; 58 ~ChromePluginPlaceholder() override;
69 59
70 // content::LoadablePluginPlaceholder overrides. 60 // content::LoadablePluginPlaceholder overrides.
71 blink::WebPlugin* CreatePlugin() override; 61 blink::WebPlugin* CreatePlugin() override;
72 void OnLoadedRectUpdate( 62 void OnBlockedTinyContent() override;
73 const gfx::Rect& unobscured_rect,
74 content::RenderFrame::PeripheralContentStatus status) override;
75 63
76 // gin::Wrappable (via PluginPlaceholder) method 64 // gin::Wrappable (via PluginPlaceholder) method
77 gin::ObjectTemplateBuilder GetObjectTemplateBuilder( 65 gin::ObjectTemplateBuilder GetObjectTemplateBuilder(
78 v8::Isolate* isolate) final; 66 v8::Isolate* isolate) final;
79 67
80 // content::RenderViewObserver (via PluginPlaceholder) override: 68 // content::RenderViewObserver (via PluginPlaceholder) override:
81 bool OnMessageReceived(const IPC::Message& message) override; 69 bool OnMessageReceived(const IPC::Message& message) override;
82 70
83 // WebViewPlugin::Delegate (via PluginPlaceholder) methods: 71 // WebViewPlugin::Delegate (via PluginPlaceholder) methods:
84 v8::Local<v8::Value> GetV8Handle(v8::Isolate* isolate) override; 72 v8::Local<v8::Value> GetV8Handle(v8::Isolate* isolate) override;
(...skipping 28 matching lines...) Expand all
113 // |routing_id()| is the routing ID of our associated RenderView, but we have 101 // |routing_id()| is the routing ID of our associated RenderView, but we have
114 // a separate routing ID for messages specific to this placeholder. 102 // a separate routing ID for messages specific to this placeholder.
115 int32_t placeholder_routing_id_ = MSG_ROUTING_NONE; 103 int32_t placeholder_routing_id_ = MSG_ROUTING_NONE;
116 104
117 bool has_host_ = false; 105 bool has_host_ = false;
118 #endif 106 #endif
119 107
120 int context_menu_request_id_; // Nonzero when request pending. 108 int context_menu_request_id_; // Nonzero when request pending.
121 base::string16 plugin_name_; 109 base::string16 plugin_name_;
122 110
123 bool ignore_updates_; 111 bool did_send_blocked_content_notification_;
124 112
125 DISALLOW_COPY_AND_ASSIGN(ChromePluginPlaceholder); 113 DISALLOW_COPY_AND_ASSIGN(ChromePluginPlaceholder);
126 }; 114 };
127 115
128 #endif // CHROME_RENDERER_PLUGINS_CHROME_PLUGIN_PLACEHOLDER_H_ 116 #endif // CHROME_RENDERER_PLUGINS_CHROME_PLUGIN_PLACEHOLDER_H_
OLDNEW
« no previous file with comments | « chrome/renderer/chrome_content_renderer_client.cc ('k') | chrome/renderer/plugins/chrome_plugin_placeholder.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698