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

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

Issue 105493002: Use base namespace for string16 in chrome/renderer. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years 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 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 "components/plugins/renderer/plugin_placeholder.h" 8 #include "components/plugins/renderer/plugin_placeholder.h"
9 9
10 struct ChromeViewHostMsg_GetPluginInfo_Status; 10 struct ChromeViewHostMsg_GetPluginInfo_Status;
11 11
12 class ChromePluginPlaceholder : public plugins::PluginPlaceholder, 12 class ChromePluginPlaceholder : public plugins::PluginPlaceholder,
13 public content::RenderProcessObserver, 13 public content::RenderProcessObserver,
14 public content::ContextMenuClient { 14 public content::ContextMenuClient {
15 public: 15 public:
16 static const char kPluginPlaceholderDataURL[]; 16 static const char kPluginPlaceholderDataURL[];
17 17
18 static ChromePluginPlaceholder* CreateBlockedPlugin( 18 static ChromePluginPlaceholder* CreateBlockedPlugin(
19 content::RenderView* render_view, 19 content::RenderView* render_view,
20 blink::WebFrame* frame, 20 blink::WebFrame* frame,
21 const blink::WebPluginParams& params, 21 const blink::WebPluginParams& params,
22 const content::WebPluginInfo& info, 22 const content::WebPluginInfo& info,
23 const std::string& identifier, 23 const std::string& identifier,
24 const string16& name, 24 const base::string16& name,
25 int resource_id, 25 int resource_id,
26 const string16& message); 26 const base::string16& message);
27 27
28 // Creates a new WebViewPlugin with a MissingPlugin as a delegate. 28 // Creates a new WebViewPlugin with a MissingPlugin as a delegate.
29 static ChromePluginPlaceholder* CreateMissingPlugin( 29 static ChromePluginPlaceholder* CreateMissingPlugin(
30 content::RenderView* render_view, 30 content::RenderView* render_view,
31 blink::WebFrame* frame, 31 blink::WebFrame* frame,
32 const blink::WebPluginParams& params); 32 const blink::WebPluginParams& params);
33 33
34 static ChromePluginPlaceholder* CreateErrorPlugin( 34 static ChromePluginPlaceholder* CreateErrorPlugin(
35 content::RenderView* render_view, 35 content::RenderView* render_view,
36 const base::FilePath& plugin_path); 36 const base::FilePath& plugin_path);
37 37
38 void SetStatus(const ChromeViewHostMsg_GetPluginInfo_Status& status); 38 void SetStatus(const ChromeViewHostMsg_GetPluginInfo_Status& status);
39 39
40 #if defined(ENABLE_PLUGIN_INSTALLATION) 40 #if defined(ENABLE_PLUGIN_INSTALLATION)
41 int32 CreateRoutingId(); 41 int32 CreateRoutingId();
42 #endif 42 #endif
43 43
44 private: 44 private:
45 ChromePluginPlaceholder(content::RenderView* render_view, 45 ChromePluginPlaceholder(content::RenderView* render_view,
46 blink::WebFrame* frame, 46 blink::WebFrame* frame,
47 const blink::WebPluginParams& params, 47 const blink::WebPluginParams& params,
48 const std::string& html_data, 48 const std::string& html_data,
49 const string16& title); 49 const base::string16& title);
50 virtual ~ChromePluginPlaceholder(); 50 virtual ~ChromePluginPlaceholder();
51 51
52 // WebViewPlugin::Delegate (via PluginPlaceholder) method 52 // WebViewPlugin::Delegate (via PluginPlaceholder) method
53 virtual void BindWebFrame(blink::WebFrame* frame) OVERRIDE; 53 virtual void BindWebFrame(blink::WebFrame* frame) OVERRIDE;
54 54
55 // content::RenderViewObserver (via PluginPlaceholder) override: 55 // content::RenderViewObserver (via PluginPlaceholder) override:
56 virtual bool OnMessageReceived(const IPC::Message& message) OVERRIDE; 56 virtual bool OnMessageReceived(const IPC::Message& message) OVERRIDE;
57 57
58 // WebViewPlugin::Delegate (via PluginPlaceholder) methods: 58 // WebViewPlugin::Delegate (via PluginPlaceholder) methods:
59 virtual void ShowContextMenu(const blink::WebMouseEvent&) OVERRIDE; 59 virtual void ShowContextMenu(const blink::WebMouseEvent&) OVERRIDE;
60 60
61 // content::RenderProcessObserver methods: 61 // content::RenderProcessObserver methods:
62 virtual void PluginListChanged() OVERRIDE; 62 virtual void PluginListChanged() OVERRIDE;
63 63
64 // content::ContextMenuClient methods: 64 // content::ContextMenuClient methods:
65 virtual void OnMenuAction(int request_id, unsigned action) OVERRIDE; 65 virtual void OnMenuAction(int request_id, unsigned action) OVERRIDE;
66 virtual void OnMenuClosed(int request_id) OVERRIDE; 66 virtual void OnMenuClosed(int request_id) OVERRIDE;
67 67
68 // Javascript callback opens chrome://plugins in a new tab. 68 // Javascript callback opens chrome://plugins in a new tab.
69 // Arguments are required by the caller, but not used. 69 // Arguments are required by the caller, but not used.
70 void OpenAboutPluginsCallback(const webkit_glue::CppArgumentList& args, 70 void OpenAboutPluginsCallback(const webkit_glue::CppArgumentList& args,
71 webkit_glue::CppVariant* result); 71 webkit_glue::CppVariant* result);
72 72
73 void OnLoadBlockedPlugins(const std::string& identifier); 73 void OnLoadBlockedPlugins(const std::string& identifier);
74 void OnSetIsPrerendering(bool is_prerendering); 74 void OnSetIsPrerendering(bool is_prerendering);
75 #if defined(ENABLE_PLUGIN_INSTALLATION) 75 #if defined(ENABLE_PLUGIN_INSTALLATION)
76 void OnDidNotFindMissingPlugin(); 76 void OnDidNotFindMissingPlugin();
77 void OnFoundMissingPlugin(const string16& plugin_name); 77 void OnFoundMissingPlugin(const base::string16& plugin_name);
78 void OnStartedDownloadingPlugin(); 78 void OnStartedDownloadingPlugin();
79 void OnFinishedDownloadingPlugin(); 79 void OnFinishedDownloadingPlugin();
80 void OnErrorDownloadingPlugin(const std::string& error); 80 void OnErrorDownloadingPlugin(const std::string& error);
81 void OnCancelledDownloadingPlugin(); 81 void OnCancelledDownloadingPlugin();
82 #endif 82 #endif
83 83
84 // We use a scoped_ptr so we can forward-declare the struct; it's defined in 84 // We use a scoped_ptr so we can forward-declare the struct; it's defined in
85 // an IPC message file which can't be easily included in other header files. 85 // an IPC message file which can't be easily included in other header files.
86 scoped_ptr<ChromeViewHostMsg_GetPluginInfo_Status> status_; 86 scoped_ptr<ChromeViewHostMsg_GetPluginInfo_Status> status_;
87 87
88 string16 title_; 88 base::string16 title_;
89 89
90 #if defined(ENABLE_PLUGIN_INSTALLATION) 90 #if defined(ENABLE_PLUGIN_INSTALLATION)
91 // |routing_id()| is the routing ID of our associated RenderView, but we have 91 // |routing_id()| is the routing ID of our associated RenderView, but we have
92 // a separate routing ID for messages specific to this placeholder. 92 // a separate routing ID for messages specific to this placeholder.
93 int32 placeholder_routing_id_; 93 int32 placeholder_routing_id_;
94 #endif 94 #endif
95 95
96 bool has_host_; 96 bool has_host_;
97 int context_menu_request_id_; // Nonzero when request pending. 97 int context_menu_request_id_; // Nonzero when request pending.
98 string16 plugin_name_; 98 base::string16 plugin_name_;
99 99
100 DISALLOW_COPY_AND_ASSIGN(ChromePluginPlaceholder); 100 DISALLOW_COPY_AND_ASSIGN(ChromePluginPlaceholder);
101 }; 101 };
102 102
103 #endif // CHROME_RENDERER_PLUGINS_CHROME_PLUGIN_PLACEHOLDER_H_ 103 #endif // CHROME_RENDERER_PLUGINS_CHROME_PLUGIN_PLACEHOLDER_H_
OLDNEW
« no previous file with comments | « chrome/renderer/net/net_error_helper.cc ('k') | chrome/renderer/plugins/chrome_plugin_placeholder.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698