| 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/common/notification_observer.h" | 9 #include "chrome/common/notification_observer.h" |
| 10 #include "chrome/common/notification_registrar.h" | 10 #include "chrome/common/notification_registrar.h" |
| (...skipping 12 matching lines...) Expand all Loading... |
| 23 BlockedPlugin(RenderView* render_view, | 23 BlockedPlugin(RenderView* render_view, |
| 24 WebKit::WebFrame* frame, | 24 WebKit::WebFrame* frame, |
| 25 const PluginGroup& info, | 25 const PluginGroup& info, |
| 26 const WebKit::WebPluginParams& params, | 26 const WebKit::WebPluginParams& params, |
| 27 const WebPreferences& settings, | 27 const WebPreferences& settings, |
| 28 int template_id, | 28 int template_id, |
| 29 const string16& message); | 29 const string16& message); |
| 30 | 30 |
| 31 WebViewPlugin* plugin() { return plugin_; } | 31 WebViewPlugin* plugin() { return plugin_; } |
| 32 | 32 |
| 33 void MenuOptionSelected(unsigned id); |
| 34 |
| 33 // WebViewPlugin::Delegate methods: | 35 // WebViewPlugin::Delegate methods: |
| 34 virtual void BindWebFrame(WebKit::WebFrame* frame); | 36 virtual void BindWebFrame(WebKit::WebFrame* frame); |
| 35 virtual void WillDestroyPlugin(); | 37 virtual void WillDestroyPlugin(); |
| 38 virtual void ShowContextMenu(const WebKit::WebMouseEvent&); |
| 36 | 39 |
| 37 // NotificationObserver methods: | 40 // NotificationObserver methods: |
| 38 virtual void Observe(NotificationType type, | 41 virtual void Observe(NotificationType type, |
| 39 const NotificationSource& source, | 42 const NotificationSource& source, |
| 40 const NotificationDetails& details); | 43 const NotificationDetails& details); |
| 41 | 44 |
| 42 private: | 45 private: |
| 43 virtual ~BlockedPlugin(); | 46 virtual ~BlockedPlugin(); |
| 44 | 47 |
| 45 // Javascript callbacks: | 48 // Javascript callbacks: |
| 46 // Load the blocked plugin by calling LoadPlugin() below. | 49 // Load the blocked plugin by calling LoadPlugin() below. |
| 47 // Takes no arguments, and returns nothing. | 50 // Takes no arguments, and returns nothing. |
| 48 void Load(const CppArgumentList& args, CppVariant* result); | 51 void Load(const CppArgumentList& args, CppVariant* result); |
| 49 | 52 |
| 50 // Load the blocked plugin. | 53 // Load the blocked plugin. |
| 51 void LoadPlugin(); | 54 void LoadPlugin(); |
| 52 | 55 |
| 56 // Hide the blocked plugin. |
| 57 void HidePlugin(); |
| 58 |
| 53 RenderView* render_view_; | 59 RenderView* render_view_; |
| 54 WebKit::WebFrame* frame_; | 60 WebKit::WebFrame* frame_; |
| 55 WebKit::WebPluginParams plugin_params_; | 61 WebKit::WebPluginParams plugin_params_; |
| 56 WebViewPlugin* plugin_; | 62 WebViewPlugin* plugin_; |
| 63 // The name of the plugin that was blocked. |
| 64 string16 name_; |
| 57 | 65 |
| 58 NotificationRegistrar registrar_; | 66 NotificationRegistrar registrar_; |
| 59 }; | 67 }; |
| 60 | 68 |
| 61 #endif // CHROME_RENDERER_BLOCKED_PLUGIN_H_ | 69 #endif // CHROME_RENDERER_BLOCKED_PLUGIN_H_ |
| OLD | NEW |