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

Side by Side Diff: content/renderer/pepper/pepper_webplugin_impl.h

Issue 669703003: Plugin Power Saver: Restrict Power Saver to cross-origin. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 2 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_PEPPER_PPEPPER_WEBPLUGIN_IMPL_H_ 5 #ifndef CONTENT_RENDERER_PEPPER_PPEPPER_WEBPLUGIN_IMPL_H_
6 #define CONTENT_RENDERER_PEPPER_PPEPPER_WEBPLUGIN_IMPL_H_ 6 #define CONTENT_RENDERER_PEPPER_PPEPPER_WEBPLUGIN_IMPL_H_
7 7
8 #include <string> 8 #include <string>
9 #include <vector> 9 #include <vector>
10 10
11 #include "base/memory/scoped_ptr.h" 11 #include "base/memory/scoped_ptr.h"
12 #include "base/memory/weak_ptr.h" 12 #include "base/memory/weak_ptr.h"
13 #include "base/sequenced_task_runner_helpers.h" 13 #include "base/sequenced_task_runner_helpers.h"
14 #include "ppapi/c/pp_var.h" 14 #include "ppapi/c/pp_var.h"
15 #include "third_party/WebKit/public/platform/WebURL.h"
15 #include "third_party/WebKit/public/web/WebPlugin.h" 16 #include "third_party/WebKit/public/web/WebPlugin.h"
16 #include "ui/gfx/rect.h" 17 #include "ui/gfx/rect.h"
17 18
18 struct _NPP; 19 struct _NPP;
19 20
20 namespace blink { 21 namespace blink {
21 struct WebPluginParams; 22 struct WebPluginParams;
22 struct WebPrintParams; 23 struct WebPrintParams;
23 } 24 }
24 25
25 namespace content { 26 namespace content {
26 27
27 class PepperPluginInstanceImpl; 28 class PepperPluginInstanceImpl;
28 class PluginModule; 29 class PluginModule;
29 class PPB_URLLoader_Impl; 30 class PPB_URLLoader_Impl;
30 class RenderFrameImpl; 31 class RenderFrameImpl;
31 32
32 class PepperWebPluginImpl : public blink::WebPlugin { 33 class PepperWebPluginImpl : public blink::WebPlugin {
33 public: 34 public:
34 PepperWebPluginImpl(PluginModule* module, 35 PepperWebPluginImpl(PluginModule* module,
35 const blink::WebPluginParams& params, 36 const blink::WebPluginParams& params,
36 RenderFrameImpl* render_frame); 37 RenderFrameImpl* render_frame,
38 const blink::WebURL& top_frame_url);
37 39
38 PepperPluginInstanceImpl* instance() { return instance_.get(); } 40 PepperPluginInstanceImpl* instance() { return instance_.get(); }
39 41
40 // blink::WebPlugin implementation. 42 // blink::WebPlugin implementation.
41 virtual blink::WebPluginContainer* container() const; 43 virtual blink::WebPluginContainer* container() const;
42 virtual bool initialize(blink::WebPluginContainer* container); 44 virtual bool initialize(blink::WebPluginContainer* container);
43 virtual void destroy(); 45 virtual void destroy();
44 virtual v8::Local<v8::Object> v8ScriptableObject( 46 virtual v8::Local<v8::Object> v8ScriptableObject(
45 v8::Isolate* isolate) override; 47 v8::Isolate* isolate) override;
46 virtual bool getFormValue(blink::WebString& value); 48 virtual bool getFormValue(blink::WebString& value);
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
92 struct InitData; 94 struct InitData;
93 95
94 scoped_ptr<InitData> init_data_; // Cleared upon successful initialization. 96 scoped_ptr<InitData> init_data_; // Cleared upon successful initialization.
95 // True if the instance represents the entire document in a frame instead of 97 // True if the instance represents the entire document in a frame instead of
96 // being an embedded resource. 98 // being an embedded resource.
97 bool full_frame_; 99 bool full_frame_;
98 scoped_refptr<PepperPluginInstanceImpl> instance_; 100 scoped_refptr<PepperPluginInstanceImpl> instance_;
99 gfx::Rect plugin_rect_; 101 gfx::Rect plugin_rect_;
100 PP_Var instance_object_; 102 PP_Var instance_object_;
101 blink::WebPluginContainer* container_; 103 blink::WebPluginContainer* container_;
104 blink::WebURL top_frame_url_;
102 105
103 DISALLOW_COPY_AND_ASSIGN(PepperWebPluginImpl); 106 DISALLOW_COPY_AND_ASSIGN(PepperWebPluginImpl);
104 }; 107 };
105 108
106 } // namespace content 109 } // namespace content
107 110
108 #endif // CONTENT_RENDERER_PEPPER_PPEPPER_WEBPLUGIN_IMPL_H_ 111 #endif // CONTENT_RENDERER_PEPPER_PPEPPER_WEBPLUGIN_IMPL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698