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

Side by Side Diff: content/renderer/browser_plugin/browser_plugin_bindings.h

Issue 564973004: Move ContentWindow from BrowserPlugin To GuestView (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: More cleanup Created 6 years, 3 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
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 CONTENT_RENDERER_BROWSER_PLUGIN_BROWSER_PLUGIN_BINDINGS_H__ 5 #ifndef CONTENT_RENDERER_BROWSER_PLUGIN_BROWSER_PLUGIN_BINDINGS_H__
6 #define CONTENT_RENDERER_BROWSER_PLUGIN_BROWSER_PLUGIN_BINDINGS_H__ 6 #define CONTENT_RENDERER_BROWSER_PLUGIN_BROWSER_PLUGIN_BINDINGS_H__
7 7
8 #include "base/memory/scoped_vector.h" 8 #include "base/memory/scoped_vector.h"
9 #include "base/memory/weak_ptr.h" 9 #include "base/memory/weak_ptr.h"
10 #include "third_party/npapi/bindings/npruntime.h" 10 #include "third_party/npapi/bindings/npruntime.h"
(...skipping 18 matching lines...) Expand all
29 29
30 explicit BrowserPluginBindings(BrowserPlugin* instance); 30 explicit BrowserPluginBindings(BrowserPlugin* instance);
31 ~BrowserPluginBindings(); 31 ~BrowserPluginBindings();
32 32
33 NPObject* np_object() const { return np_object_; } 33 NPObject* np_object() const { return np_object_; }
34 34
35 BrowserPlugin* instance() const { return instance_; } 35 BrowserPlugin* instance() const { return instance_; }
36 36
37 bool HasMethod(NPIdentifier name) const; 37 bool HasMethod(NPIdentifier name) const;
38 38
39 bool InvokeMethod(NPIdentifier name,
40 const NPVariant* args,
41 uint32 arg_count,
42 NPVariant* result);
43
44 bool HasProperty(NPIdentifier name) const; 39 bool HasProperty(NPIdentifier name) const;
45 bool SetProperty(NPObject* np_obj, 40 bool SetProperty(NPObject* np_obj,
46 NPIdentifier name, 41 NPIdentifier name,
47 const NPVariant* variant); 42 const NPVariant* variant);
48 bool GetProperty(NPIdentifier name, NPVariant* result); 43 bool GetProperty(NPIdentifier name, NPVariant* result);
49 bool RemoveProperty(NPObject *np_obj, NPIdentifier name); 44 bool RemoveProperty(NPObject *np_obj, NPIdentifier name);
50 private: 45 private:
51 BrowserPlugin* instance_; 46 BrowserPlugin* instance_;
52 // The NPObject we use to expose postMessage to JavaScript. 47 // The NPObject we use to expose postMessage to JavaScript.
53 BrowserPluginNPObject* np_object_; 48 BrowserPluginNPObject* np_object_;
54 49
55 typedef ScopedVector<BrowserPluginPropertyBinding> PropertyBindingList; 50 typedef ScopedVector<BrowserPluginPropertyBinding> PropertyBindingList;
56 PropertyBindingList property_bindings_; 51 PropertyBindingList property_bindings_;
57 52
58 // This is used to ensure pending tasks will not fire after this object is 53 // This is used to ensure pending tasks will not fire after this object is
59 // destroyed. 54 // destroyed.
60 base::WeakPtrFactory<BrowserPluginBindings> weak_ptr_factory_; 55 base::WeakPtrFactory<BrowserPluginBindings> weak_ptr_factory_;
61 56
62 DISALLOW_COPY_AND_ASSIGN(BrowserPluginBindings); 57 DISALLOW_COPY_AND_ASSIGN(BrowserPluginBindings);
63 }; 58 };
64 59
65 } // namespace content 60 } // namespace content
66 61
67 #endif // CONTENT_RENDERER_BROWSER_PLUGIN_BROWSER_PLUGIN_BINDINGS_H__ 62 #endif // CONTENT_RENDERER_BROWSER_PLUGIN_BROWSER_PLUGIN_BINDINGS_H__
OLDNEW
« no previous file with comments | « content/renderer/browser_plugin/browser_plugin.cc ('k') | content/renderer/browser_plugin/browser_plugin_bindings.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698