Chromium Code Reviews| OLD | NEW |
|---|---|
| 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_PEPPER_PLUGIN_INSTANCE_IMPL_H_ | 5 #ifndef CONTENT_RENDERER_PEPPER_PEPPER_PLUGIN_INSTANCE_IMPL_H_ |
| 6 #define CONTENT_RENDERER_PEPPER_PEPPER_PLUGIN_INSTANCE_IMPL_H_ | 6 #define CONTENT_RENDERER_PEPPER_PEPPER_PLUGIN_INSTANCE_IMPL_H_ |
| 7 | 7 |
| 8 #include <stddef.h> | 8 #include <stddef.h> |
| 9 #include <stdint.h> | 9 #include <stdint.h> |
| 10 | 10 |
| (...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 84 struct WebURLError; | 84 struct WebURLError; |
| 85 struct WebPrintParams; | 85 struct WebPrintParams; |
| 86 } | 86 } |
| 87 | 87 |
| 88 namespace cc { | 88 namespace cc { |
| 89 class TextureLayer; | 89 class TextureLayer; |
| 90 } | 90 } |
| 91 | 91 |
| 92 namespace gfx { | 92 namespace gfx { |
| 93 class Range; | 93 class Range; |
| 94 class Rect; | |
| 94 } | 95 } |
| 95 | 96 |
| 96 namespace ppapi { | 97 namespace ppapi { |
| 97 class Resource; | 98 class Resource; |
| 98 struct InputEventData; | 99 struct InputEventData; |
| 99 struct PPP_Instance_Combined; | 100 struct PPP_Instance_Combined; |
| 100 class ScopedPPVar; | 101 class ScopedPPVar; |
| 101 } | 102 } |
| 102 | 103 |
| 103 namespace content { | 104 namespace content { |
| (...skipping 259 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 363 // case is non-NULL as long as the corresponding loader resource is alive. | 364 // case is non-NULL as long as the corresponding loader resource is alive. |
| 364 // This pointer is non-owning, so the loader must use set_document_loader to | 365 // This pointer is non-owning, so the loader must use set_document_loader to |
| 365 // clear itself when it is destroyed. | 366 // clear itself when it is destroyed. |
| 366 blink::WebURLLoaderClient* document_loader() const { | 367 blink::WebURLLoaderClient* document_loader() const { |
| 367 return document_loader_; | 368 return document_loader_; |
| 368 } | 369 } |
| 369 void set_document_loader(blink::WebURLLoaderClient* loader) { | 370 void set_document_loader(blink::WebURLLoaderClient* loader) { |
| 370 document_loader_ = loader; | 371 document_loader_ = loader; |
| 371 } | 372 } |
| 372 | 373 |
| 374 // Converts the PP_Rect between DIP and Viewport. | |
| 375 void ConvertRectToDIP(PP_Rect* rect) const; | |
| 376 void ConvertDIPToViewport(gfx::Rect* rect) const; | |
|
bbudge
2016/01/21 00:34:52
Is there a reason these are public?
oshima
2016/01/21 01:12:07
Nope, thank you for the catch. Moved to private/bo
| |
| 377 | |
| 373 ContentDecryptorDelegate* GetContentDecryptorDelegate(); | 378 ContentDecryptorDelegate* GetContentDecryptorDelegate(); |
| 374 | 379 |
| 375 // PluginInstance implementation | 380 // PluginInstance implementation |
| 376 RenderView* GetRenderView() override; | 381 RenderView* GetRenderView() override; |
| 377 blink::WebPluginContainer* GetContainer() override; | 382 blink::WebPluginContainer* GetContainer() override; |
| 378 v8::Isolate* GetIsolate() const override; | 383 v8::Isolate* GetIsolate() const override; |
| 379 ppapi::VarTracker* GetVarTracker() override; | 384 ppapi::VarTracker* GetVarTracker() override; |
| 380 const GURL& GetPluginURL() override; | 385 const GURL& GetPluginURL() override; |
| 381 base::FilePath GetModulePath() override; | 386 base::FilePath GetModulePath() override; |
| 382 PP_Resource CreateImage(gfx::ImageSkia* source_image, float scale) override; | 387 PP_Resource CreateImage(gfx::ImageSkia* source_image, float scale) override; |
| (...skipping 532 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 915 | 920 |
| 916 scoped_ptr<MouseLockDispatcher::LockTarget> lock_target_; | 921 scoped_ptr<MouseLockDispatcher::LockTarget> lock_target_; |
| 917 | 922 |
| 918 bool is_deleted_; | 923 bool is_deleted_; |
| 919 | 924 |
| 920 // The text that is currently selected in the plugin. | 925 // The text that is currently selected in the plugin. |
| 921 base::string16 selected_text_; | 926 base::string16 selected_text_; |
| 922 | 927 |
| 923 bool initialized_; | 928 bool initialized_; |
| 924 | 929 |
| 930 float viewport_to_dip_scale_; | |
|
bbudge
2016/01/21 00:34:51
nit: Maybe it would be better to group this with o
oshima
2016/01/21 01:12:07
Done.
| |
| 931 | |
| 925 // We use a weak ptr factory for scheduling DidChangeView events so that we | 932 // We use a weak ptr factory for scheduling DidChangeView events so that we |
| 926 // can tell whether updates are pending and consolidate them. When there's | 933 // can tell whether updates are pending and consolidate them. When there's |
| 927 // already a weak ptr pending (HasWeakPtrs is true), code should update the | 934 // already a weak ptr pending (HasWeakPtrs is true), code should update the |
| 928 // view_data_ but not send updates. This also allows us to cancel scheduled | 935 // view_data_ but not send updates. This also allows us to cancel scheduled |
| 929 // view change events. | 936 // view change events. |
| 930 base::WeakPtrFactory<PepperPluginInstanceImpl> view_change_weak_ptr_factory_; | 937 base::WeakPtrFactory<PepperPluginInstanceImpl> view_change_weak_ptr_factory_; |
| 931 base::WeakPtrFactory<PepperPluginInstanceImpl> weak_factory_; | 938 base::WeakPtrFactory<PepperPluginInstanceImpl> weak_factory_; |
| 932 | 939 |
| 933 DISALLOW_COPY_AND_ASSIGN(PepperPluginInstanceImpl); | 940 DISALLOW_COPY_AND_ASSIGN(PepperPluginInstanceImpl); |
| 934 }; | 941 }; |
| 935 | 942 |
| 936 } // namespace content | 943 } // namespace content |
| 937 | 944 |
| 938 #endif // CONTENT_RENDERER_PEPPER_PEPPER_PLUGIN_INSTANCE_IMPL_H_ | 945 #endif // CONTENT_RENDERER_PEPPER_PEPPER_PLUGIN_INSTANCE_IMPL_H_ |
| OLD | NEW |