Chromium Code Reviews

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

Issue 5639004: Implement a useful context menu for the blocked plug-in frame:... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 10 years ago
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View unified diff | | 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/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 11 matching lines...)
22 public: 22 public:
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 void menuOptionSelected(unsigned id);
brettw 2010/12/07 06:23:56 This should be capitalized. I'd probably also put
Chris Evans 2010/12/07 15:36:14 Done.
32 33
33 // WebViewPlugin::Delegate methods: 34 // WebViewPlugin::Delegate methods:
34 virtual void BindWebFrame(WebKit::WebFrame* frame); 35 virtual void BindWebFrame(WebKit::WebFrame* frame);
35 virtual void WillDestroyPlugin(); 36 virtual void WillDestroyPlugin();
37 virtual void ShowContextMenu(const WebKit::WebMouseEvent&);
36 38
37 // NotificationObserver methods: 39 // NotificationObserver methods:
38 virtual void Observe(NotificationType type, 40 virtual void Observe(NotificationType type,
39 const NotificationSource& source, 41 const NotificationSource& source,
40 const NotificationDetails& details); 42 const NotificationDetails& details);
41 43
42 private: 44 private:
43 virtual ~BlockedPlugin(); 45 virtual ~BlockedPlugin();
44 46
45 // Javascript callbacks: 47 // Javascript callbacks:
46 // Load the blocked plugin by calling LoadPlugin() below. 48 // Load the blocked plugin by calling LoadPlugin() below.
47 // Takes no arguments, and returns nothing. 49 // Takes no arguments, and returns nothing.
48 void Load(const CppArgumentList& args, CppVariant* result); 50 void Load(const CppArgumentList& args, CppVariant* result);
49 51
50 // Load the blocked plugin. 52 // Load the blocked plugin.
51 void LoadPlugin(); 53 void LoadPlugin();
52 54
55 // Hide the blocked plugin.
56 void HidePlugin();
57
53 RenderView* render_view_; 58 RenderView* render_view_;
54 WebKit::WebFrame* frame_; 59 WebKit::WebFrame* frame_;
55 WebKit::WebPluginParams plugin_params_; 60 WebKit::WebPluginParams plugin_params_;
56 WebViewPlugin* plugin_; 61 WebViewPlugin* plugin_;
62 string16 name_;
brettw 2010/12/07 06:23:56 Can you provide a comment for this? It's very gene
Chris Evans 2010/12/07 15:36:14 Done.
57 63
58 NotificationRegistrar registrar_; 64 NotificationRegistrar registrar_;
59 }; 65 };
60 66
61 #endif // CHROME_RENDERER_BLOCKED_PLUGIN_H_ 67 #endif // CHROME_RENDERER_BLOCKED_PLUGIN_H_
OLDNEW

Powered by Google App Engine