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

Unified Diff: content/renderer/render_thread_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 tcp tests Created 7 years, 5 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
Index: content/renderer/render_thread_impl.h
===================================================================
--- content/renderer/render_thread_impl.h (revision 214423)
+++ content/renderer/render_thread_impl.h (working copy)
@@ -9,8 +9,11 @@
#include <string>
#include <vector>
+#include "base/callback_forward.h"
+#include "base/id_map.h"
#include "base/memory/memory_pressure_listener.h"
#include "base/observer_list.h"
+#include "base/platform_file.h"
#include "base/strings/string16.h"
#include "base/timer/timer.h"
#include "build/build_config.h"
@@ -21,6 +24,7 @@
#include "content/public/renderer/render_thread.h"
#include "content/renderer/media/renderer_gpu_video_decoder_factories.h"
#include "ipc/ipc_channel_proxy.h"
+#include "ipc/ipc_platform_file.h"
#include "ui/gfx/native_widget_types.h"
class GrContext;
@@ -345,6 +349,13 @@
void SetFlingCurveParameters(const std::vector<float>& new_touchpad,
const std::vector<float>& new_touchscreen);
+ // Sends an async IPC to open a local file.
+ typedef base::Callback<void (base::PlatformFileError, base::PassPlatformFile)>
+ AsyncOpenFileCallback;
+ void AsyncOpenFile(const base::FilePath& path,
+ int flags,
+ const AsyncOpenFileCallback& callback);
+
private:
// ChildThread
virtual bool OnControlMessageReceived(const IPC::Message& msg) OVERRIDE;
@@ -377,6 +388,9 @@
void OnGetAccessibilityTree();
void OnTempCrashWithData(const GURL& data);
void OnSetWebKitSharedTimersSuspended(bool suspend);
+ void OnAsyncFileOpened(base::PlatformFileError error_code,
+ IPC::PlatformFileForTransit file_for_transit,
+ int message_id);
void OnMemoryPressure(
base::MemoryPressureListener::MemoryPressureLevel memory_pressure_level);
@@ -488,6 +502,8 @@
scoped_ptr<WebRTCIdentityService> webrtc_identity_service_;
+ IDMap<AsyncOpenFileCallback> pending_async_open_files_;
+
DISALLOW_COPY_AND_ASSIGN(RenderThreadImpl);
};

Powered by Google App Engine
This is Rietveld 408576698