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

Side by Side Diff: content/browser/plugin_process_host.h

Issue 9369009: Make content::ResourceContext be a real interface like the rest of the Content API (i.e. don't ha... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: sync Created 8 years, 10 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 | « content/browser/plugin_data_remover_impl.cc ('k') | content/browser/plugin_process_host.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) 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_BROWSER_PLUGIN_PROCESS_HOST_H_ 5 #ifndef CONTENT_BROWSER_PLUGIN_PROCESS_HOST_H_
6 #define CONTENT_BROWSER_PLUGIN_PROCESS_HOST_H_ 6 #define CONTENT_BROWSER_PLUGIN_PROCESS_HOST_H_
7 #pragma once 7 #pragma once
8 8
9 #include "build/build_config.h" 9 #include "build/build_config.h"
10 10
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
48 class CONTENT_EXPORT PluginProcessHost 48 class CONTENT_EXPORT PluginProcessHost
49 : public content::BrowserChildProcessHostDelegate, 49 : public content::BrowserChildProcessHostDelegate,
50 public IPC::Message::Sender { 50 public IPC::Message::Sender {
51 public: 51 public:
52 class Client { 52 class Client {
53 public: 53 public:
54 // Returns an opaque unique identifier for the process requesting 54 // Returns an opaque unique identifier for the process requesting
55 // the channel. 55 // the channel.
56 virtual int ID() = 0; 56 virtual int ID() = 0;
57 // Returns the resource context for the renderer requesting the channel. 57 // Returns the resource context for the renderer requesting the channel.
58 virtual const content::ResourceContext& GetResourceContext() = 0; 58 virtual content::ResourceContext* GetResourceContext() = 0;
59 virtual bool OffTheRecord() = 0; 59 virtual bool OffTheRecord() = 0;
60 virtual void SetPluginInfo(const webkit::WebPluginInfo& info) = 0; 60 virtual void SetPluginInfo(const webkit::WebPluginInfo& info) = 0;
61 virtual void OnFoundPluginProcessHost(PluginProcessHost* host) = 0; 61 virtual void OnFoundPluginProcessHost(PluginProcessHost* host) = 0;
62 virtual void OnSentPluginChannelRequest() = 0; 62 virtual void OnSentPluginChannelRequest() = 0;
63 // The client should delete itself when one of these methods is called. 63 // The client should delete itself when one of these methods is called.
64 virtual void OnChannelOpened(const IPC::ChannelHandle& handle) = 0; 64 virtual void OnChannelOpened(const IPC::ChannelHandle& handle) = 0;
65 virtual void OnError() = 0; 65 virtual void OnError() = 0;
66 66
67 protected: 67 protected:
68 virtual ~Client() {} 68 virtual ~Client() {}
(...skipping 16 matching lines...) Expand all
85 virtual void OnChannelConnected(int32 peer_pid) OVERRIDE; 85 virtual void OnChannelConnected(int32 peer_pid) OVERRIDE;
86 virtual void OnChannelError() OVERRIDE; 86 virtual void OnChannelError() OVERRIDE;
87 87
88 // Tells the plugin process to create a new channel for communication with a 88 // Tells the plugin process to create a new channel for communication with a
89 // renderer. When the plugin process responds with the channel name, 89 // renderer. When the plugin process responds with the channel name,
90 // OnChannelOpened in the client is called. 90 // OnChannelOpened in the client is called.
91 void OpenChannelToPlugin(Client* client); 91 void OpenChannelToPlugin(Client* client);
92 92
93 // Cancels all pending channel requests for the given resource context. 93 // Cancels all pending channel requests for the given resource context.
94 static void CancelPendingRequestsForResourceContext( 94 static void CancelPendingRequestsForResourceContext(
95 const content::ResourceContext* context); 95 content::ResourceContext* context);
96 96
97 // This function is called to cancel pending requests to open new channels. 97 // This function is called to cancel pending requests to open new channels.
98 void CancelPendingRequest(Client* client); 98 void CancelPendingRequest(Client* client);
99 99
100 // This function is called to cancel sent requests to open new channels. 100 // This function is called to cancel sent requests to open new channels.
101 void CancelSentRequest(Client* client); 101 void CancelSentRequest(Client* client);
102 102
103 // This function is called on the IO thread once we receive a reply from the 103 // This function is called on the IO thread once we receive a reply from the
104 // modal HTML dialog (in the form of a JSON string). This function forwards 104 // modal HTML dialog (in the form of a JSON string). This function forwards
105 // that reply back to the plugin that requested the dialog. 105 // that reply back to the plugin that requested the dialog.
(...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after
185 185
186 class PluginProcessHostIterator 186 class PluginProcessHostIterator
187 : public content::BrowserChildProcessHostTypeIterator<PluginProcessHost> { 187 : public content::BrowserChildProcessHostTypeIterator<PluginProcessHost> {
188 public: 188 public:
189 PluginProcessHostIterator() 189 PluginProcessHostIterator()
190 : content::BrowserChildProcessHostTypeIterator<PluginProcessHost>( 190 : content::BrowserChildProcessHostTypeIterator<PluginProcessHost>(
191 content::PROCESS_TYPE_PLUGIN) {} 191 content::PROCESS_TYPE_PLUGIN) {}
192 }; 192 };
193 193
194 #endif // CONTENT_BROWSER_PLUGIN_PROCESS_HOST_H_ 194 #endif // CONTENT_BROWSER_PLUGIN_PROCESS_HOST_H_
OLDNEW
« no previous file with comments | « content/browser/plugin_data_remover_impl.cc ('k') | content/browser/plugin_process_host.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698