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

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

Issue 2405013002: Move some global feature defines to buildflags (Closed)
Patch Set: Comment Created 4 years, 2 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
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 <stdint.h> 8 #include <stdint.h>
9 #include <string> 9 #include <string>
10 10
11 #include "base/macros.h" 11 #include "base/macros.h"
12 #include "chrome/common/features.h"
12 #include "chrome/common/prerender_types.h" 13 #include "chrome/common/prerender_types.h"
13 #include "chrome/renderer/plugins/power_saver_info.h" 14 #include "chrome/renderer/plugins/power_saver_info.h"
14 #include "components/plugins/renderer/loadable_plugin_placeholder.h" 15 #include "components/plugins/renderer/loadable_plugin_placeholder.h"
15 #include "content/public/renderer/context_menu_client.h" 16 #include "content/public/renderer/context_menu_client.h"
16 #include "content/public/renderer/render_thread_observer.h" 17 #include "content/public/renderer/render_thread_observer.h"
17 18
18 enum class ChromeViewHostMsg_GetPluginInfo_Status; 19 enum class ChromeViewHostMsg_GetPluginInfo_Status;
19 20
20 class ChromePluginPlaceholder final 21 class ChromePluginPlaceholder final
21 : public plugins::LoadablePluginPlaceholder, 22 : public plugins::LoadablePluginPlaceholder,
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after
79 void OnMenuAction(int request_id, unsigned action) override; 80 void OnMenuAction(int request_id, unsigned action) override;
80 void OnMenuClosed(int request_id) override; 81 void OnMenuClosed(int request_id) override;
81 82
82 // Javascript callbacks: 83 // Javascript callbacks:
83 // Open chrome://plugins in a new tab. 84 // Open chrome://plugins in a new tab.
84 void OpenAboutPluginsCallback(); 85 void OpenAboutPluginsCallback();
85 // Show the Plugins permission bubble. 86 // Show the Plugins permission bubble.
86 void ShowPermissionBubbleCallback(); 87 void ShowPermissionBubbleCallback();
87 88
88 // IPC message handlers: 89 // IPC message handlers:
89 #if defined(ENABLE_PLUGIN_INSTALLATION) 90 #if BUILDFLAG(ENABLE_PLUGIN_INSTALLATION)
90 void OnDidNotFindMissingPlugin(); 91 void OnDidNotFindMissingPlugin();
91 void OnFoundMissingPlugin(const base::string16& plugin_name); 92 void OnFoundMissingPlugin(const base::string16& plugin_name);
92 void OnStartedDownloadingPlugin(); 93 void OnStartedDownloadingPlugin();
93 void OnFinishedDownloadingPlugin(); 94 void OnFinishedDownloadingPlugin();
94 void OnErrorDownloadingPlugin(const std::string& error); 95 void OnErrorDownloadingPlugin(const std::string& error);
95 void OnCancelledDownloadingPlugin(); 96 void OnCancelledDownloadingPlugin();
96 #endif 97 #endif
97 void OnPluginComponentUpdateDownloading(); 98 void OnPluginComponentUpdateDownloading();
98 void OnPluginComponentUpdateSuccess(); 99 void OnPluginComponentUpdateSuccess();
99 void OnPluginComponentUpdateFailure(); 100 void OnPluginComponentUpdateFailure();
100 void OnSetPrerenderMode(prerender::PrerenderMode mode); 101 void OnSetPrerenderMode(prerender::PrerenderMode mode);
101 102
102 ChromeViewHostMsg_GetPluginInfo_Status status_; 103 ChromeViewHostMsg_GetPluginInfo_Status status_;
103 104
104 base::string16 title_; 105 base::string16 title_;
105 106
106 // |routing_id()| is the routing ID of our associated RenderView, but we have 107 // |routing_id()| is the routing ID of our associated RenderView, but we have
107 // a separate routing ID for messages specific to this placeholder. 108 // a separate routing ID for messages specific to this placeholder.
108 int32_t placeholder_routing_id_ = MSG_ROUTING_NONE; 109 int32_t placeholder_routing_id_ = MSG_ROUTING_NONE;
109 110
110 #if defined(ENABLE_PLUGIN_INSTALLATION) 111 #if BUILDFLAG(ENABLE_PLUGIN_INSTALLATION)
111 bool has_host_ = false; 112 bool has_host_ = false;
112 #endif 113 #endif
113 114
114 int context_menu_request_id_; // Nonzero when request pending. 115 int context_menu_request_id_; // Nonzero when request pending.
115 base::string16 plugin_name_; 116 base::string16 plugin_name_;
116 117
117 bool did_send_blocked_content_notification_; 118 bool did_send_blocked_content_notification_;
118 119
119 DISALLOW_COPY_AND_ASSIGN(ChromePluginPlaceholder); 120 DISALLOW_COPY_AND_ASSIGN(ChromePluginPlaceholder);
120 }; 121 };
121 122
122 #endif // CHROME_RENDERER_PLUGINS_CHROME_PLUGIN_PLACEHOLDER_H_ 123 #endif // CHROME_RENDERER_PLUGINS_CHROME_PLUGIN_PLACEHOLDER_H_
OLDNEW
« no previous file with comments | « chrome/renderer/chrome_content_renderer_client.cc ('k') | chrome/renderer/plugins/chrome_plugin_placeholder.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698