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

Unified Diff: content/renderer/pepper/pepper_helper_impl.h

Issue 20777009: A few more cleanups to the pepper code. Dispatch IPCs in the sockets implementations directly by ha… (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: fix browsertest Created 7 years, 4 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « content/renderer/pepper/pepper_graphics_2d_host.cc ('k') | content/renderer/pepper/pepper_helper_impl.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/renderer/pepper/pepper_helper_impl.h
===================================================================
--- content/renderer/pepper/pepper_helper_impl.h (revision 215615)
+++ content/renderer/pepper/pepper_helper_impl.h (working copy)
@@ -5,26 +5,20 @@
#ifndef CONTENT_RENDERER_PEPPER_PEPPER_PLUGIN_DELEGATE_H_
#define CONTENT_RENDERER_PEPPER_PEPPER_PLUGIN_DELEGATE_H_
-#include <map>
#include <set>
#include <string>
-#include <vector>
#include "base/basictypes.h"
#include "base/id_map.h"
#include "base/memory/ref_counted.h"
#include "base/memory/scoped_ptr.h"
#include "base/memory/weak_ptr.h"
-#include "base/observer_list.h"
#include "content/public/renderer/render_view_observer.h"
-#include "content/renderer/pepper/pepper_browser_connection.h"
#include "content/renderer/pepper_helper.h"
-#include "ipc/ipc_platform_file.h"
#include "ppapi/c/pp_file_info.h"
#include "ppapi/c/ppb_tcp_socket.h"
#include "ppapi/c/private/ppb_tcp_socket_private.h"
#include "ppapi/shared_impl/private/tcp_socket_private_impl.h"
-#include "ppapi/shared_impl/url_response_info_data.h"
#include "ui/base/ime/text_input_type.h"
namespace base {
@@ -32,13 +26,9 @@
}
namespace ppapi {
-class PepperFilePath;
class PpapiPermissions;
-class PPB_X509Certificate_Fields;
-namespace host {
-class ResourceHost;
+struct URLResponseInfoData;
}
-}
namespace WebKit {
class WebGamepads;
@@ -53,7 +43,6 @@
class PepperBroker;
class PluginModule;
class PPB_Broker_Impl;
-class PPB_TCPSocket_Private_Impl;
class RenderViewImpl;
struct WebPluginInfo;
@@ -66,10 +55,6 @@
RenderViewImpl* render_view() { return render_view_; }
- PepperBrowserConnection* pepper_browser_connection() {
- return &pepper_browser_connection_;
- }
-
// A pointer is returned immediately, but it is not ready to be used until
// BrokerConnected has been called.
// The caller is responsible for calling Disconnect() on the returned pointer
@@ -79,10 +64,6 @@
// Removes broker from pending_connect_broker_ if present. Returns true if so.
bool StopWaitingForBrokerConnection(PepperBroker* broker);
- void RegisterTCPSocket(PPB_TCPSocket_Private_Impl* socket, uint32 socket_id);
- void UnregisterTCPSocket(uint32 socket_id);
- void TCPServerSocketStopListening(uint32 socket_id);
-
// Notifies that |instance| has changed the cursor.
// This will update the cursor appearance if it is currently over the plugin
// instance.
@@ -115,13 +96,6 @@
// from this call.
void InstanceDeleted(PepperPluginInstanceImpl* instance);
- // Sends an async IPC to open a local file.
- typedef base::Callback<void (base::PlatformFileError, base::PassPlatformFile)>
- AsyncOpenFileCallback;
- bool AsyncOpenFile(const base::FilePath& path,
- int pp_open_flags,
- const AsyncOpenFileCallback& callback);
-
// Retrieve current gamepad data.
void SampleGamepads(WebKit::WebGamepads* data);
@@ -178,32 +152,9 @@
virtual bool OnMessageReceived(const IPC::Message& message) OVERRIDE;
virtual void OnDestruct() OVERRIDE;
- void OnTCPSocketConnectACK(uint32 plugin_dispatcher_id,
- uint32 socket_id,
- int32_t result,
- const PP_NetAddress_Private& local_addr,
- const PP_NetAddress_Private& remote_addr);
- void OnTCPSocketSSLHandshakeACK(
- uint32 plugin_dispatcher_id,
- uint32 socket_id,
- bool succeeded,
- const ppapi::PPB_X509Certificate_Fields& certificate_fields);
- void OnTCPSocketReadACK(uint32 plugin_dispatcher_id,
- uint32 socket_id,
- int32_t result,
- const std::string& data);
- void OnTCPSocketWriteACK(uint32 plugin_dispatcher_id,
- uint32 socket_id,
- int32_t result);
- void OnTCPSocketSetOptionACK(uint32 plugin_dispatcher_id,
- uint32 socket_id,
- int32_t result);
void OnPpapiBrokerChannelCreated(int request_id,
base::ProcessId broker_pid,
const IPC::ChannelHandle& handle);
- void OnAsyncFileOpened(base::PlatformFileError error_code,
- IPC::PlatformFileForTransit file_for_transit,
- int message_id);
void OnPpapiBrokerPermissionResult(int request_id, bool result);
// Attempts to create a PPAPI plugin for the given filepath. On success, it
@@ -242,16 +193,8 @@
// Pointer to the RenderView that owns us.
RenderViewImpl* render_view_;
- // Connection for sending and receiving pepper host-related messages to/from
- // the browser.
- PepperBrowserConnection pepper_browser_connection_;
-
std::set<PepperPluginInstanceImpl*> active_instances_;
- IDMap<AsyncOpenFileCallback> pending_async_open_files_;
-
- IDMap<PPB_TCPSocket_Private_Impl> tcp_sockets_;
-
typedef IDMap<scoped_refptr<PepperBroker>, IDMapOwnPointer> BrokerMap;
BrokerMap pending_connect_broker_;
« no previous file with comments | « content/renderer/pepper/pepper_graphics_2d_host.cc ('k') | content/renderer/pepper/pepper_helper_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698