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

Unified Diff: content/renderer/pepper/pepper_browser_connection.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/audio_helper.cc ('k') | content/renderer/pepper/pepper_browser_connection.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/renderer/pepper/pepper_browser_connection.h
===================================================================
--- content/renderer/pepper/pepper_browser_connection.h (revision 215615)
+++ content/renderer/pepper/pepper_browser_connection.h (working copy)
@@ -11,19 +11,20 @@
#include "base/callback.h"
#include "base/files/file_path.h"
#include "content/public/renderer/render_view_observer.h"
+#include "content/public/renderer/render_view_observer_tracker.h"
#include "ppapi/c/pp_file_info.h"
#include "ppapi/c/pp_instance.h"
#include "ppapi/c/pp_resource.h"
namespace content {
-class PepperHelperImpl;
-
// This class represents a connection from the renderer to the browser for
// sending/receiving pepper ResourceHost related messages. When the browser
// and renderer communicate about ResourceHosts, they should pass the plugin
// process ID to identify which plugin they are talking about.
-class PepperBrowserConnection {
+class PepperBrowserConnection
+ : public RenderViewObserver,
+ public RenderViewObserverTracker<PepperBrowserConnection> {
public:
typedef base::Callback<void(int)> PendingResourceIDCallback;
typedef base::Callback<void(
@@ -32,10 +33,10 @@
const std::vector<std::string>&,
const std::vector<base::FilePath>&)> FileRefGetInfoCallback;
- explicit PepperBrowserConnection(PepperHelperImpl* helper);
+ explicit PepperBrowserConnection(RenderView* render_view);
virtual ~PepperBrowserConnection();
- bool OnMessageReceived(const IPC::Message& message);
+ virtual bool OnMessageReceived(const IPC::Message& message) OVERRIDE;
// TODO(teravest): Instead of having separate methods per message, we should
// add generic functionality similar to PluginResource::Call().
@@ -78,9 +79,6 @@
// Return the next sequence number.
int32_t GetNextSequence();
- // The plugin helper that owns us.
- PepperHelperImpl* helper_;
-
// Sequence number to track pending callbacks.
int32_t next_sequence_number_;
« no previous file with comments | « content/renderer/pepper/audio_helper.cc ('k') | content/renderer/pepper/pepper_browser_connection.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698