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

Side by Side Diff: chrome/plugin/plugin_channel.h

Issue 5978003: Make IPC::Channel::Listener:OnMessageReceived have a return value indicating ... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 9 years, 12 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
« no previous file with comments | « chrome/plugin/npobject_stub.cc ('k') | chrome/plugin/plugin_channel.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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_PLUGIN_PLUGIN_CHANNEL_H_ 5 #ifndef CHROME_PLUGIN_PLUGIN_CHANNEL_H_
6 #define CHROME_PLUGIN_PLUGIN_CHANNEL_H_ 6 #define CHROME_PLUGIN_PLUGIN_CHANNEL_H_
7 #pragma once 7 #pragma once
8 8
9 #include <vector> 9 #include <vector>
10 #include "base/ref_counted.h" 10 #include "base/ref_counted.h"
(...skipping 15 matching lines...) Expand all
26 // by the browser. 26 // by the browser.
27 static PluginChannel* GetPluginChannel(int renderer_id, 27 static PluginChannel* GetPluginChannel(int renderer_id,
28 MessageLoop* ipc_message_loop); 28 MessageLoop* ipc_message_loop);
29 29
30 // Send a message to all renderers that the process is going to shutdown. 30 // Send a message to all renderers that the process is going to shutdown.
31 static void NotifyRenderersOfPendingShutdown(); 31 static void NotifyRenderersOfPendingShutdown();
32 32
33 virtual ~PluginChannel(); 33 virtual ~PluginChannel();
34 34
35 virtual bool Send(IPC::Message* msg); 35 virtual bool Send(IPC::Message* msg);
36 virtual void OnMessageReceived(const IPC::Message& message); 36 virtual bool OnMessageReceived(const IPC::Message& message);
37 37
38 base::ProcessHandle renderer_handle() const { return renderer_handle_; } 38 base::ProcessHandle renderer_handle() const { return renderer_handle_; }
39 int renderer_id() { return renderer_id_; } 39 int renderer_id() { return renderer_id_; }
40 40
41 virtual int GenerateRouteID(); 41 virtual int GenerateRouteID();
42 42
43 // Returns the event that's set when a call to the renderer causes a modal 43 // Returns the event that's set when a call to the renderer causes a modal
44 // dialog to come up. 44 // dialog to come up.
45 base::WaitableEvent* GetModalDialogEvent(gfx::NativeViewId containing_window); 45 base::WaitableEvent* GetModalDialogEvent(gfx::NativeViewId containing_window);
46 46
(...skipping 15 matching lines...) Expand all
62 62
63 // Overrides PluginChannelBase::Init. 63 // Overrides PluginChannelBase::Init.
64 virtual bool Init(MessageLoop* ipc_message_loop, bool create_pipe_now); 64 virtual bool Init(MessageLoop* ipc_message_loop, bool create_pipe_now);
65 65
66 private: 66 private:
67 class MessageFilter; 67 class MessageFilter;
68 68
69 // Called on the plugin thread 69 // Called on the plugin thread
70 PluginChannel(); 70 PluginChannel();
71 71
72 virtual void OnControlMessageReceived(const IPC::Message& msg); 72 virtual bool OnControlMessageReceived(const IPC::Message& msg);
73 73
74 static PluginChannelBase* ClassFactory() { return new PluginChannel(); } 74 static PluginChannelBase* ClassFactory() { return new PluginChannel(); }
75 75
76 void OnCreateInstance(const std::string& mime_type, int* instance_id); 76 void OnCreateInstance(const std::string& mime_type, int* instance_id);
77 void OnDestroyInstance(int instance_id, IPC::Message* reply_msg); 77 void OnDestroyInstance(int instance_id, IPC::Message* reply_msg);
78 void OnGenerateRouteID(int* route_id); 78 void OnGenerateRouteID(int* route_id);
79 void OnClearSiteData(uint64 flags, 79 void OnClearSiteData(uint64 flags,
80 const std::string& domain, 80 const std::string& domain,
81 base::Time begin_time); 81 base::Time begin_time);
82 82
83 std::vector<scoped_refptr<WebPluginDelegateStub> > plugin_stubs_; 83 std::vector<scoped_refptr<WebPluginDelegateStub> > plugin_stubs_;
84 84
85 // Handle to the renderer process who is on the other side of the channel. 85 // Handle to the renderer process who is on the other side of the channel.
86 base::ProcessHandle renderer_handle_; 86 base::ProcessHandle renderer_handle_;
87 87
88 // The id of the renderer who is on the other side of the channel. 88 // The id of the renderer who is on the other side of the channel.
89 int renderer_id_; 89 int renderer_id_;
90 90
91 int in_send_; // Tracks if we're in a Send call. 91 int in_send_; // Tracks if we're in a Send call.
92 bool log_messages_; // True if we should log sent and received messages. 92 bool log_messages_; // True if we should log sent and received messages.
93 bool off_the_record_; // True if the renderer is in off the record mode. 93 bool off_the_record_; // True if the renderer is in off the record mode.
94 scoped_refptr<MessageFilter> filter_; // Handles the modal dialog events. 94 scoped_refptr<MessageFilter> filter_; // Handles the modal dialog events.
95 95
96 DISALLOW_COPY_AND_ASSIGN(PluginChannel); 96 DISALLOW_COPY_AND_ASSIGN(PluginChannel);
97 }; 97 };
98 98
99 #endif // CHROME_PLUGIN_PLUGIN_CHANNEL_H_ 99 #endif // CHROME_PLUGIN_PLUGIN_CHANNEL_H_
OLDNEW
« no previous file with comments | « chrome/plugin/npobject_stub.cc ('k') | chrome/plugin/plugin_channel.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698