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

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

Issue 6253017: Pepper/Flapper: First pass at context menu implementation. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: PPB_Flash: 4 -> 5 Created 9 years, 10 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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_PEPPER_PLUGIN_DELEGATE_IMPL_H_ 5 #ifndef CHROME_RENDERER_PEPPER_PLUGIN_DELEGATE_IMPL_H_
6 #define CHROME_RENDERER_PEPPER_PLUGIN_DELEGATE_IMPL_H_ 6 #define CHROME_RENDERER_PEPPER_PLUGIN_DELEGATE_IMPL_H_
7 #pragma once 7 #pragma once
8 8
9 #include <set> 9 #include <set>
10 #include <string> 10 #include <string>
11 11
12 #include "base/basictypes.h" 12 #include "base/basictypes.h"
13 #include "base/id_map.h" 13 #include "base/id_map.h"
14 #include "base/ref_counted.h" 14 #include "base/ref_counted.h"
15 #include "base/weak_ptr.h" 15 #include "base/weak_ptr.h"
16 #include "ppapi/c/pp_errors.h" 16 #include "ppapi/c/pp_errors.h"
17 #include "webkit/plugins/ppapi/plugin_delegate.h" 17 #include "webkit/plugins/ppapi/plugin_delegate.h"
18 #include "webkit/plugins/ppapi/ppapi_plugin_instance.h" 18 #include "webkit/plugins/ppapi/ppapi_plugin_instance.h"
19 #include "webkit/plugins/ppapi/ppb_flash_menu_impl.h"
19 20
20 class FilePath; 21 class FilePath;
21 class RenderView; 22 class RenderView;
22 23
23 namespace gfx { 24 namespace gfx {
25 class Point;
24 class Rect; 26 class Rect;
25 } 27 }
26 28
27 namespace webkit { 29 namespace webkit {
28 namespace ppapi { 30 namespace ppapi {
29 31
30 class PluginInstance; 32 class PluginInstance;
31 class PluginModule; 33 class PluginModule;
32 34
33 } // namespace ppapi 35 } // namespace ppapi
(...skipping 113 matching lines...) Expand 10 before | Expand all | Expand 10 after
147 uint16_t port); 149 uint16_t port);
148 virtual int32_t ConnectTcpAddress( 150 virtual int32_t ConnectTcpAddress(
149 webkit::ppapi::PPB_Flash_NetConnector_Impl* connector, 151 webkit::ppapi::PPB_Flash_NetConnector_Impl* connector,
150 const struct PP_Flash_NetAddress* addr); 152 const struct PP_Flash_NetAddress* addr);
151 // This is the completion for both |ConnectTcp()| and |ConnectTcpAddress()|. 153 // This is the completion for both |ConnectTcp()| and |ConnectTcpAddress()|.
152 void OnConnectTcpACK( 154 void OnConnectTcpACK(
153 int request_id, 155 int request_id,
154 base::PlatformFile socket, 156 base::PlatformFile socket,
155 const PP_Flash_NetAddress& local_addr, 157 const PP_Flash_NetAddress& local_addr,
156 const PP_Flash_NetAddress& remote_addr); 158 const PP_Flash_NetAddress& remote_addr);
159 virtual int32_t ShowContextMenu(
160 webkit::ppapi::PPB_Flash_Menu_Impl* menu,
161 const gfx::Point& position);
162 void CompleteShowContextMenu(int request_id,
163 bool did_select,
164 unsigned action);
157 virtual webkit::ppapi::FullscreenContainer* 165 virtual webkit::ppapi::FullscreenContainer*
158 CreateFullscreenContainer( 166 CreateFullscreenContainer(
159 webkit::ppapi::PluginInstance* instance); 167 webkit::ppapi::PluginInstance* instance);
160 virtual std::string GetDefaultEncoding(); 168 virtual std::string GetDefaultEncoding();
161 virtual void ZoomLimitsChanged(double minimum_factor, double maximum_factor); 169 virtual void ZoomLimitsChanged(double minimum_factor, double maximum_factor);
162 virtual std::string ResolveProxy(const GURL& url); 170 virtual std::string ResolveProxy(const GURL& url);
163 virtual void DidStartLoading(); 171 virtual void DidStartLoading();
164 virtual void DidStopLoading(); 172 virtual void DidStopLoading();
165 virtual void SetContentRestriction(int restrictions); 173 virtual void SetContentRestriction(int restrictions);
166 virtual void HasUnsupportedFeature(); 174 virtual void HasUnsupportedFeature();
167 175
168 private: 176 private:
169 // Pointer to the RenderView that owns us. 177 // Pointer to the RenderView that owns us.
170 RenderView* render_view_; 178 RenderView* render_view_;
171 179
172 std::set<webkit::ppapi::PluginInstance*> active_instances_; 180 std::set<webkit::ppapi::PluginInstance*> active_instances_;
173 181
174 // TODO(viettrungluu): Get rid of |id_generator_| -- just use |IDMap::Add()|. 182 // TODO(viettrungluu): Get rid of |id_generator_| -- just use |IDMap::Add()|.
175 // Rename |messages_waiting_replies_| (to specify async open file). 183 // Rename |messages_waiting_replies_| (to specify async open file).
176 int id_generator_; 184 int id_generator_;
177 IDMap<AsyncOpenFileCallback> messages_waiting_replies_; 185 IDMap<AsyncOpenFileCallback> messages_waiting_replies_;
178 186
179 IDMap<scoped_refptr<webkit::ppapi::PPB_Flash_NetConnector_Impl>, 187 IDMap<scoped_refptr<webkit::ppapi::PPB_Flash_NetConnector_Impl>,
180 IDMapOwnPointer> pending_connect_tcps_; 188 IDMapOwnPointer> pending_connect_tcps_;
181 189
190 IDMap<scoped_refptr<webkit::ppapi::PPB_Flash_Menu_Impl>,
191 IDMapOwnPointer> pending_context_menus_;
192
182 DISALLOW_COPY_AND_ASSIGN(PepperPluginDelegateImpl); 193 DISALLOW_COPY_AND_ASSIGN(PepperPluginDelegateImpl);
183 }; 194 };
184 195
185 #endif // CHROME_RENDERER_PEPPER_PLUGIN_DELEGATE_IMPL_H_ 196 #endif // CHROME_RENDERER_PEPPER_PLUGIN_DELEGATE_IMPL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698