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

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

Issue 11316316: Implement an IsAllowed function in the pepper PPB_Broker_Trusted API (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 8 years 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 | « webkit/plugins/ppapi/plugin_module.cc ('k') | webkit/plugins/ppapi/ppapi_plugin_instance.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) 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_PPAPI_PLUGIN_INSTANCE_H_ 5 #ifndef WEBKIT_PLUGINS_PPAPI_PPAPI_PLUGIN_INSTANCE_H_
6 #define WEBKIT_PLUGINS_PPAPI_PPAPI_PLUGIN_INSTANCE_H_ 6 #define WEBKIT_PLUGINS_PPAPI_PPAPI_PLUGIN_INSTANCE_H_
7 7
8 #include <set> 8 #include <set>
9 #include <string> 9 #include <string>
10 #include <vector> 10 #include <vector>
(...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after
97 // ResourceTracker. 97 // ResourceTracker.
98 class WEBKIT_PLUGINS_EXPORT PluginInstance : 98 class WEBKIT_PLUGINS_EXPORT PluginInstance :
99 public base::RefCounted<PluginInstance>, 99 public base::RefCounted<PluginInstance>,
100 public base::SupportsWeakPtr<PluginInstance>, 100 public base::SupportsWeakPtr<PluginInstance>,
101 public ::ppapi::PPB_Instance_Shared { 101 public ::ppapi::PPB_Instance_Shared {
102 public: 102 public:
103 // Create and return a PluginInstance object which supports the most recent 103 // Create and return a PluginInstance object which supports the most recent
104 // version of PPP_Instance possible by querying the given get_plugin_interface 104 // version of PPP_Instance possible by querying the given get_plugin_interface
105 // function. If the plugin does not support any valid PPP_Instance interface, 105 // function. If the plugin does not support any valid PPP_Instance interface,
106 // returns NULL. 106 // returns NULL.
107 static PluginInstance* Create(PluginDelegate* delegate, PluginModule* module); 107 static PluginInstance* Create(PluginDelegate* delegate,
108 PluginModule* module,
109 WebKit::WebPluginContainer* container,
110 const GURL& plugin_url);
108 // Delete should be called by the WebPlugin before this destructor. 111 // Delete should be called by the WebPlugin before this destructor.
109 virtual ~PluginInstance(); 112 virtual ~PluginInstance();
110 113
111 PluginDelegate* delegate() const { return delegate_; } 114 PluginDelegate* delegate() const { return delegate_; }
112 PluginModule* module() const { return module_.get(); } 115 PluginModule* module() const { return module_.get(); }
113 MessageChannel& message_channel() { return *message_channel_; } 116 MessageChannel& message_channel() { return *message_channel_; }
114 117
115 WebKit::WebPluginContainer* container() const { return container_; } 118 WebKit::WebPluginContainer* container() const { return container_; }
116 119
117 void set_always_on_top(bool on_top) { always_on_top_ = on_top; } 120 void set_always_on_top(bool on_top) { always_on_top_ = on_top; }
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
156 159
157 // Called when the out-of-process plugin implementing this instance crashed. 160 // Called when the out-of-process plugin implementing this instance crashed.
158 void InstanceCrashed(); 161 void InstanceCrashed();
159 162
160 // PPB_Instance and PPB_Instance_Private implementation. 163 // PPB_Instance and PPB_Instance_Private implementation.
161 const GURL& plugin_url() const { return plugin_url_; } 164 const GURL& plugin_url() const { return plugin_url_; }
162 bool full_frame() const { return full_frame_; } 165 bool full_frame() const { return full_frame_; }
163 const ::ppapi::ViewData& view_data() const { return view_data_; } 166 const ::ppapi::ViewData& view_data() const { return view_data_; }
164 167
165 // PPP_Instance and PPP_Instance_Private pass-through. 168 // PPP_Instance and PPP_Instance_Private pass-through.
166 bool Initialize(WebKit::WebPluginContainer* container, 169 bool Initialize(const std::vector<std::string>& arg_names,
167 const std::vector<std::string>& arg_names,
168 const std::vector<std::string>& arg_values, 170 const std::vector<std::string>& arg_values,
169 const GURL& plugin_url,
170 bool full_frame); 171 bool full_frame);
171 bool HandleDocumentLoad(PPB_URLLoader_Impl* loader); 172 bool HandleDocumentLoad(PPB_URLLoader_Impl* loader);
172 bool HandleInputEvent(const WebKit::WebInputEvent& event, 173 bool HandleInputEvent(const WebKit::WebInputEvent& event,
173 WebKit::WebCursorInfo* cursor_info); 174 WebKit::WebCursorInfo* cursor_info);
174 PP_Var GetInstanceObject(); 175 PP_Var GetInstanceObject();
175 void ViewChanged(const gfx::Rect& position, const gfx::Rect& clip, 176 void ViewChanged(const gfx::Rect& position, const gfx::Rect& clip,
176 const std::vector<gfx::Rect>& cut_outs_rects); 177 const std::vector<gfx::Rect>& cut_outs_rects);
177 178
178 // Handlers for composition events. 179 // Handlers for composition events.
179 bool HandleCompositionStart(const string16& text); 180 bool HandleCompositionStart(const string16& text);
(...skipping 291 matching lines...) Expand 10 before | Expand all | Expand 10 after
471 private: 472 private:
472 PluginDelegate* delegate_; 473 PluginDelegate* delegate_;
473 }; 474 };
474 475
475 // See the static Create functions above for creating PluginInstance objects. 476 // See the static Create functions above for creating PluginInstance objects.
476 // This constructor is private so that we can hide the PPP_Instance_Combined 477 // This constructor is private so that we can hide the PPP_Instance_Combined
477 // details while still having 1 constructor to maintain for member 478 // details while still having 1 constructor to maintain for member
478 // initialization. 479 // initialization.
479 PluginInstance(PluginDelegate* delegate, 480 PluginInstance(PluginDelegate* delegate,
480 PluginModule* module, 481 PluginModule* module,
481 ::ppapi::PPP_Instance_Combined* instance_interface); 482 ::ppapi::PPP_Instance_Combined* instance_interface,
483 WebKit::WebPluginContainer* container,
484 const GURL& plugin_url);
482 485
483 bool LoadFindInterface(); 486 bool LoadFindInterface();
484 bool LoadInputEventInterface(); 487 bool LoadInputEventInterface();
485 bool LoadMessagingInterface(); 488 bool LoadMessagingInterface();
486 bool LoadMouseLockInterface(); 489 bool LoadMouseLockInterface();
487 bool LoadPdfInterface(); 490 bool LoadPdfInterface();
488 bool LoadPrintInterface(); 491 bool LoadPrintInterface();
489 bool LoadPrivateInterface(); 492 bool LoadPrivateInterface();
490 bool LoadSelectionInterface(); 493 bool LoadSelectionInterface();
491 bool LoadTextInputInterface(); 494 bool LoadTextInputInterface();
(...skipping 267 matching lines...) Expand 10 before | Expand all | Expand 10 after
759 // calls and handles PPB_ContentDecryptor_Private calls. 762 // calls and handles PPB_ContentDecryptor_Private calls.
760 scoped_ptr<ContentDecryptorDelegate> content_decryptor_delegate_; 763 scoped_ptr<ContentDecryptorDelegate> content_decryptor_delegate_;
761 764
762 DISALLOW_COPY_AND_ASSIGN(PluginInstance); 765 DISALLOW_COPY_AND_ASSIGN(PluginInstance);
763 }; 766 };
764 767
765 } // namespace ppapi 768 } // namespace ppapi
766 } // namespace webkit 769 } // namespace webkit
767 770
768 #endif // WEBKIT_PLUGINS_PPAPI_PPAPI_PLUGIN_INSTANCE_H_ 771 #endif // WEBKIT_PLUGINS_PPAPI_PPAPI_PLUGIN_INSTANCE_H_
OLDNEW
« no previous file with comments | « webkit/plugins/ppapi/plugin_module.cc ('k') | webkit/plugins/ppapi/ppapi_plugin_instance.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698