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

Side by Side Diff: webkit/plugins/ppapi/ppb_broker_impl.h

Issue 10854040: Add hooks to content to request permission to connect to the PPAPI broker. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: brett Created 8 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 WEBKIT_PLUGINS_PPAPI_PPB_BROKER_IMPL_H_ 5 #ifndef WEBKIT_PLUGINS_PPAPI_PPB_BROKER_IMPL_H_
6 #define WEBKIT_PLUGINS_PPAPI_PPB_BROKER_IMPL_H_ 6 #define WEBKIT_PLUGINS_PPAPI_PPB_BROKER_IMPL_H_
7 7
8 #include "base/basictypes.h" 8 #include "base/basictypes.h"
9 #include "base/compiler_specific.h" 9 #include "base/compiler_specific.h"
10 #include "base/memory/weak_ptr.h" 10 #include "base/memory/weak_ptr.h"
(...skipping 18 matching lines...) Expand all
29 virtual ~PPB_Broker_Impl(); 29 virtual ~PPB_Broker_Impl();
30 30
31 // Resource override. 31 // Resource override.
32 virtual ::ppapi::thunk::PPB_Broker_API* AsPPB_Broker_API() OVERRIDE; 32 virtual ::ppapi::thunk::PPB_Broker_API* AsPPB_Broker_API() OVERRIDE;
33 33
34 // PPB_BrokerTrusted implementation. 34 // PPB_BrokerTrusted implementation.
35 virtual int32_t Connect( 35 virtual int32_t Connect(
36 scoped_refptr< ::ppapi::TrackedCallback> connect_callback) OVERRIDE; 36 scoped_refptr< ::ppapi::TrackedCallback> connect_callback) OVERRIDE;
37 virtual int32_t GetHandle(int32_t* handle) OVERRIDE; 37 virtual int32_t GetHandle(int32_t* handle) OVERRIDE;
38 38
39 // Returns the URL of the document this plug-in runs in. This is necessary to
40 // decide whether to grant access to the PPAPI broker.
41 GURL GetDocumentUrl();
42
39 void BrokerConnected(int32_t handle, int32_t result); 43 void BrokerConnected(int32_t handle, int32_t result);
40 44
41 private: 45 private:
42 // PluginDelegate ppapi broker object. 46 // PluginDelegate ppapi broker object.
43 // We don't own this pointer but are responsible for calling Disconnect on it. 47 // We don't own this pointer but are responsible for calling Disconnect on it.
44 PluginDelegate::Broker* broker_; 48 PluginDelegate::Broker* broker_;
45 49
46 // Callback invoked from BrokerConnected. 50 // Callback invoked from BrokerConnected.
47 scoped_refptr< ::ppapi::TrackedCallback> connect_callback_; 51 scoped_refptr< ::ppapi::TrackedCallback> connect_callback_;
48 52
49 // Pipe handle for the plugin instance to use to communicate with the broker. 53 // Pipe handle for the plugin instance to use to communicate with the broker.
50 // Never owned by this object. 54 // Never owned by this object.
51 int32_t pipe_handle_; 55 int32_t pipe_handle_;
52 56
53 DISALLOW_COPY_AND_ASSIGN(PPB_Broker_Impl); 57 DISALLOW_COPY_AND_ASSIGN(PPB_Broker_Impl);
54 }; 58 };
55 59
56 } // namespace ppapi 60 } // namespace ppapi
57 } // namespace webkit 61 } // namespace webkit
58 62
59 #endif // WEBKIT_PLUGINS_PPAPI_PPB_BROKER_IMPL_H_ 63 #endif // WEBKIT_PLUGINS_PPAPI_PPB_BROKER_IMPL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698