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

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

Issue 8688002: PPB_TCPSocket_Private/PPB_UDPSocket_Private are exposed to Browser (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Fixed codereview issues. Created 9 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
OLDNEW
1 // Copyright (c) 2011 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 CONTENT_RENDERER_PEPPER_PLUGIN_DELEGATE_IMPL_H_ 5 #ifndef CONTENT_RENDERER_PEPPER_PLUGIN_DELEGATE_IMPL_H_
6 #define CONTENT_RENDERER_PEPPER_PLUGIN_DELEGATE_IMPL_H_ 6 #define CONTENT_RENDERER_PEPPER_PLUGIN_DELEGATE_IMPL_H_
7 #pragma once 7 #pragma once
8 8
9 #include <set> 9 #include <set>
10 #include <map> 10 #include <map>
11 #include <string> 11 #include <string>
12 12
13 #include "base/basictypes.h" 13 #include "base/basictypes.h"
14 #include "base/id_map.h" 14 #include "base/id_map.h"
15 #include "base/memory/ref_counted.h" 15 #include "base/memory/ref_counted.h"
16 #include "base/memory/weak_ptr.h" 16 #include "base/memory/weak_ptr.h"
17 #include "content/common/content_export.h" 17 #include "content/common/content_export.h"
18 #include "content/renderer/pepper_parent_context_provider.h" 18 #include "content/renderer/pepper_parent_context_provider.h"
19 #include "ppapi/proxy/broker_dispatcher.h" 19 #include "ppapi/proxy/broker_dispatcher.h"
20 #include "ppapi/proxy/proxy_channel.h" 20 #include "ppapi/proxy/proxy_channel.h"
21 #include "ui/base/ime/text_input_type.h" 21 #include "ui/base/ime/text_input_type.h"
22 #include "webkit/plugins/ppapi/plugin_delegate.h" 22 #include "webkit/plugins/ppapi/plugin_delegate.h"
23 #include "webkit/plugins/ppapi/ppb_broker_impl.h" 23 #include "webkit/plugins/ppapi/ppb_broker_impl.h"
24 #include "webkit/plugins/ppapi/ppb_flash_menu_impl.h" 24 #include "webkit/plugins/ppapi/ppb_flash_menu_impl.h"
25 25
26 #include "ppapi/shared_impl/tcp_socket_impl.h"
yzshen1 2011/11/29 20:19:33 Sort, please. And remove the empty line.
ygorshenin 2011/11/30 11:50:54 Done.
27 #include "ppapi/shared_impl/udp_socket_impl.h"
28
26 class FilePath; 29 class FilePath;
27 class PepperPluginDelegateImpl; 30 class PepperPluginDelegateImpl;
28 class RenderViewImpl; 31 class RenderViewImpl;
29 32
30 namespace gfx { 33 namespace gfx {
31 class Point; 34 class Point;
32 class Rect; 35 class Rect;
33 } 36 }
34 37
35 namespace IPC { 38 namespace IPC {
(...skipping 267 matching lines...) Expand 10 before | Expand all | Expand 10 after
303 uint16_t port) OVERRIDE; 306 uint16_t port) OVERRIDE;
304 virtual int32_t ConnectTcpAddress( 307 virtual int32_t ConnectTcpAddress(
305 webkit::ppapi::PPB_Flash_NetConnector_Impl* connector, 308 webkit::ppapi::PPB_Flash_NetConnector_Impl* connector,
306 const struct PP_NetAddress_Private* addr) OVERRIDE; 309 const struct PP_NetAddress_Private* addr) OVERRIDE;
307 // This is the completion for both |ConnectTcp()| and |ConnectTcpAddress()|. 310 // This is the completion for both |ConnectTcp()| and |ConnectTcpAddress()|.
308 void OnConnectTcpACK( 311 void OnConnectTcpACK(
309 int request_id, 312 int request_id,
310 base::PlatformFile socket, 313 base::PlatformFile socket,
311 const PP_NetAddress_Private& local_addr, 314 const PP_NetAddress_Private& local_addr,
312 const PP_NetAddress_Private& remote_addr); 315 const PP_NetAddress_Private& remote_addr);
316
317 virtual uint32 TCPSocketCreate() OVERRIDE;
318 virtual void TCPSocketConnect(
319 webkit::ppapi::PPB_TCPSocket_Private_Impl* socket,
320 uint32 socket_id,
321 const std::string& host,
322 uint16_t port) OVERRIDE;
323 virtual void TCPSocketConnectWithNetAddress(
324 webkit::ppapi::PPB_TCPSocket_Private_Impl* socket,
325 uint32 socket_id,
326 const PP_NetAddress_Private& addr) OVERRIDE;
327 void OnTCPSocketConnectACK(uint32 socket_id,
328 bool succeeded,
329 const PP_NetAddress_Private& local_addr,
330 const PP_NetAddress_Private& remote_addr);
331
332 virtual void TCPSocketSSLHandshake(uint32 socket_id,
333 const std::string& server_name,
334 uint16_t server_port) OVERRIDE;
335 void OnTCPSocketSSLHandshakeACK(uint32 socket_id, bool succeeded);
336
337 virtual void TCPSocketRead(uint32 socket_id, int32_t bytes_to_read) OVERRIDE;
338 void OnTCPSocketReadACK(uint32 socket_id,
339 bool succeeded,
340 const std::string& data);
341
342 virtual void TCPSocketWrite(uint32 socket_id,
343 const std::string& buffer) OVERRIDE;
344 void OnTCPSocketWriteACK(uint32 socket_id,
345 bool succeeded,
346 int32_t bytes_written);
347
348 virtual void TCPSocketDisconnect(uint32 socket_id) OVERRIDE;
349
350 virtual uint32 UDPSocketCreate() OVERRIDE;
351
352 virtual void UDPSocketBind(
353 webkit::ppapi::PPB_UDPSocket_Private_Impl* socket,
354 uint32 socket_id,
355 const PP_NetAddress_Private& addr) OVERRIDE;
356 void OnUDPSocketBindACK(uint32 socket_id, bool succeeded);
357
358 virtual void UDPSocketRecvFrom(uint32 socket_id,
359 int32_t num_bytes) OVERRIDE;
360 void OnUDPSocketRecvFromACK(uint32 socket_id,
361 bool succeeded,
362 const std::string& data,
363 const PP_NetAddress_Private& remote_addr);
364
365 virtual void UDPSocketSendTo(uint32 socket_id,
366 const std::string& buffer,
367 const PP_NetAddress_Private& addr) OVERRIDE;
368 void OnUDPSocketSendToACK(uint32 socket_id,
369 bool succeeded,
370 int32_t bytes_written);
371
372 virtual void UDPSocketClose(uint32 socket_id) OVERRIDE;
373
313 virtual int32_t ShowContextMenu( 374 virtual int32_t ShowContextMenu(
314 webkit::ppapi::PluginInstance* instance, 375 webkit::ppapi::PluginInstance* instance,
315 webkit::ppapi::PPB_Flash_Menu_Impl* menu, 376 webkit::ppapi::PPB_Flash_Menu_Impl* menu,
316 const gfx::Point& position) OVERRIDE; 377 const gfx::Point& position) OVERRIDE;
317 void OnContextMenuClosed( 378 void OnContextMenuClosed(
318 const webkit_glue::CustomContextMenuContext& custom_context); 379 const webkit_glue::CustomContextMenuContext& custom_context);
319 void OnCustomContextMenuAction( 380 void OnCustomContextMenuAction(
320 const webkit_glue::CustomContextMenuContext& custom_context, 381 const webkit_glue::CustomContextMenuContext& custom_context,
321 unsigned action); 382 unsigned action);
322 void CompleteShowContextMenu(int request_id, 383 void CompleteShowContextMenu(int request_id,
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
369 430
370 // Used to send a single context menu "completion" upon menu close. 431 // Used to send a single context menu "completion" upon menu close.
371 bool has_saved_context_menu_action_; 432 bool has_saved_context_menu_action_;
372 unsigned saved_context_menu_action_; 433 unsigned saved_context_menu_action_;
373 434
374 IDMap<AsyncOpenFileCallback> pending_async_open_files_; 435 IDMap<AsyncOpenFileCallback> pending_async_open_files_;
375 436
376 IDMap<scoped_refptr<webkit::ppapi::PPB_Flash_NetConnector_Impl>, 437 IDMap<scoped_refptr<webkit::ppapi::PPB_Flash_NetConnector_Impl>,
377 IDMapOwnPointer> pending_connect_tcps_; 438 IDMapOwnPointer> pending_connect_tcps_;
378 439
440 IDMap<webkit::ppapi::PPB_TCPSocket_Private_Impl> tcp_sockets_;
441
442 IDMap<webkit::ppapi::PPB_UDPSocket_Private_Impl> udp_sockets_;
443
379 IDMap<scoped_refptr<webkit::ppapi::PPB_Flash_Menu_Impl>, 444 IDMap<scoped_refptr<webkit::ppapi::PPB_Flash_Menu_Impl>,
380 IDMapOwnPointer> pending_context_menus_; 445 IDMapOwnPointer> pending_context_menus_;
381 446
382 typedef IDMap<scoped_refptr<PpapiBrokerImpl>, IDMapOwnPointer> BrokerMap; 447 typedef IDMap<scoped_refptr<PpapiBrokerImpl>, IDMapOwnPointer> BrokerMap;
383 BrokerMap pending_connect_broker_; 448 BrokerMap pending_connect_broker_;
384 449
385 // Whether or not the focus is on a PPAPI plugin 450 // Whether or not the focus is on a PPAPI plugin
386 webkit::ppapi::PluginInstance* focused_plugin_; 451 webkit::ppapi::PluginInstance* focused_plugin_;
387 452
388 // Current text input composition text. Empty if no composition is in 453 // Current text input composition text. Empty if no composition is in
(...skipping 18 matching lines...) Expand all
407 // The plugin instance that received the last mouse event. It is set to NULL 472 // The plugin instance that received the last mouse event. It is set to NULL
408 // if the last mouse event went to elements other than Pepper plugins. 473 // if the last mouse event went to elements other than Pepper plugins.
409 // |last_mouse_event_target_| is not owned by this class. We can know about 474 // |last_mouse_event_target_| is not owned by this class. We can know about
410 // when it is destroyed via InstanceDeleted(). 475 // when it is destroyed via InstanceDeleted().
411 webkit::ppapi::PluginInstance* last_mouse_event_target_; 476 webkit::ppapi::PluginInstance* last_mouse_event_target_;
412 477
413 DISALLOW_COPY_AND_ASSIGN(PepperPluginDelegateImpl); 478 DISALLOW_COPY_AND_ASSIGN(PepperPluginDelegateImpl);
414 }; 479 };
415 480
416 #endif // CONTENT_RENDERER_PEPPER_PLUGIN_DELEGATE_IMPL_H_ 481 #endif // CONTENT_RENDERER_PEPPER_PLUGIN_DELEGATE_IMPL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698