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

Side by Side Diff: chrome/renderer/blocked_plugin.h

Issue 6247013: Don't load plugins on prerendered pages until the pages are displayed.... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 9 years, 11 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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_BLOCKED_PLUGIN_H_ 5 #ifndef CHROME_RENDERER_BLOCKED_PLUGIN_H_
6 #define CHROME_RENDERER_BLOCKED_PLUGIN_H_ 6 #define CHROME_RENDERER_BLOCKED_PLUGIN_H_
7 #pragma once 7 #pragma once
8 8
9 #include "chrome/renderer/render_view_observer.h" 9 #include "chrome/renderer/render_view_observer.h"
10 #include "third_party/WebKit/Source/WebKit/chromium/public/WebPluginParams.h" 10 #include "third_party/WebKit/Source/WebKit/chromium/public/WebPluginParams.h"
(...skipping 11 matching lines...) Expand all
22 class BlockedPlugin : public RenderViewObserver, 22 class BlockedPlugin : public RenderViewObserver,
23 public CppBoundClass, 23 public CppBoundClass,
24 public webkit::npapi::WebViewPlugin::Delegate { 24 public webkit::npapi::WebViewPlugin::Delegate {
25 public: 25 public:
26 BlockedPlugin(RenderView* render_view, 26 BlockedPlugin(RenderView* render_view,
27 WebKit::WebFrame* frame, 27 WebKit::WebFrame* frame,
28 const webkit::npapi::PluginGroup& info, 28 const webkit::npapi::PluginGroup& info,
29 const WebKit::WebPluginParams& params, 29 const WebKit::WebPluginParams& params,
30 const WebPreferences& settings, 30 const WebPreferences& settings,
31 int template_id, 31 int template_id,
32 const string16& message); 32 const string16& message,
33 bool is_blocked_for_prerendering);
cbentzel 2011/01/20 19:46:59 Would it make sense to use an enum like BLOCKED_RE
mmenke 2011/01/20 20:04:22 It might. Seems we have 4 reasons, I believe - ou
33 34
34 webkit::npapi::WebViewPlugin* plugin() { return plugin_; } 35 webkit::npapi::WebViewPlugin* plugin() { return plugin_; }
35 36
36 // WebViewPlugin::Delegate methods: 37 // WebViewPlugin::Delegate methods:
37 virtual void BindWebFrame(WebKit::WebFrame* frame); 38 virtual void BindWebFrame(WebKit::WebFrame* frame);
38 virtual void WillDestroyPlugin(); 39 virtual void WillDestroyPlugin();
39 virtual void ShowContextMenu(const WebKit::WebMouseEvent&); 40 virtual void ShowContextMenu(const WebKit::WebMouseEvent&);
40 41
41 private: 42 private:
42 virtual ~BlockedPlugin(); 43 virtual ~BlockedPlugin();
(...skipping 18 matching lines...) Expand all
61 // Hide the blocked plugin. 62 // Hide the blocked plugin.
62 void HidePlugin(); 63 void HidePlugin();
63 64
64 WebKit::WebFrame* frame_; 65 WebKit::WebFrame* frame_;
65 WebKit::WebPluginParams plugin_params_; 66 WebKit::WebPluginParams plugin_params_;
66 webkit::npapi::WebViewPlugin* plugin_; 67 webkit::npapi::WebViewPlugin* plugin_;
67 // The name of the plugin that was blocked. 68 // The name of the plugin that was blocked.
68 string16 name_; 69 string16 name_;
69 // True iff we're showing a custom menu. 70 // True iff we're showing a custom menu.
70 bool custom_menu_showing_; 71 bool custom_menu_showing_;
72 // True iff the plugin was blocked because the page was being prerendered.
73 // Plugin will automatically be loaded when the page is displayed.
74 bool is_blocked_for_prerendering_;
71 }; 75 };
72 76
73 #endif // CHROME_RENDERER_BLOCKED_PLUGIN_H_ 77 #endif // CHROME_RENDERER_BLOCKED_PLUGIN_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698