OLD | NEW |
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/custom_menu_listener.h" | 9 #include "chrome/renderer/custom_menu_listener.h" |
10 #include "third_party/WebKit/WebKit/chromium/public/WebPluginParams.h" | 10 #include "third_party/WebKit/WebKit/chromium/public/WebPluginParams.h" |
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
43 // CustomMenuListener methods: | 43 // CustomMenuListener methods: |
44 virtual void MenuItemSelected(unsigned id); | 44 virtual void MenuItemSelected(unsigned id); |
45 | 45 |
46 // Load the blocked plugin. | 46 // Load the blocked plugin. |
47 void LoadPlugin(); | 47 void LoadPlugin(); |
48 | 48 |
49 private: | 49 private: |
50 virtual ~BlockedPlugin(); | 50 virtual ~BlockedPlugin(); |
51 | 51 |
52 // Javascript callbacks: | 52 // Javascript callbacks: |
53 // Load the blocked plugin by calling LoadPlugin() below. | 53 // Load the blocked plugin by calling LoadPlugin(). |
54 // Takes no arguments, and returns nothing. | 54 // Takes no arguments, and returns nothing. |
55 void Load(const CppArgumentList& args, CppVariant* result); | 55 void Load(const CppArgumentList& args, CppVariant* result); |
56 | 56 |
| 57 // Hide the blocked plugin by calling HidePlugin(). |
| 58 // Takes no arguments, and returns nothing. |
| 59 void Hide(const CppArgumentList& args, CppVariant* result); |
| 60 |
57 // Hide the blocked plugin. | 61 // Hide the blocked plugin. |
58 void HidePlugin(); | 62 void HidePlugin(); |
59 | 63 |
60 RenderView* render_view_; | 64 RenderView* render_view_; |
61 WebKit::WebFrame* frame_; | 65 WebKit::WebFrame* frame_; |
62 WebKit::WebPluginParams plugin_params_; | 66 WebKit::WebPluginParams plugin_params_; |
63 webkit::npapi::WebViewPlugin* plugin_; | 67 webkit::npapi::WebViewPlugin* plugin_; |
64 // The name of the plugin that was blocked. | 68 // The name of the plugin that was blocked. |
65 string16 name_; | 69 string16 name_; |
66 }; | 70 }; |
67 | 71 |
68 #endif // CHROME_RENDERER_BLOCKED_PLUGIN_H_ | 72 #endif // CHROME_RENDERER_BLOCKED_PLUGIN_H_ |
OLD | NEW |