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_RENDERER_PPAPI_HOST_IMPL_H_ | 5 #ifndef CONTENT_RENDERER_PEPPER_RENDERER_PPAPI_HOST_IMPL_H_ |
6 #define CONTENT_RENDERER_PEPPER_RENDERER_PPAPI_HOST_IMPL_H_ | 6 #define CONTENT_RENDERER_PEPPER_RENDERER_PPAPI_HOST_IMPL_H_ |
7 | 7 |
8 #include <memory> | 8 #include <memory> |
9 | 9 |
10 #include "base/macros.h" | 10 #include "base/macros.h" |
(...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
93 bool IsRunningInProcess() const override; | 93 bool IsRunningInProcess() const override; |
94 std::string GetPluginName() const override; | 94 std::string GetPluginName() const override; |
95 void SetToExternalPluginHost() override; | 95 void SetToExternalPluginHost() override; |
96 void CreateBrowserResourceHosts( | 96 void CreateBrowserResourceHosts( |
97 PP_Instance instance, | 97 PP_Instance instance, |
98 const std::vector<IPC::Message>& nested_msgs, | 98 const std::vector<IPC::Message>& nested_msgs, |
99 const base::Callback<void(const std::vector<int>&)>& callback) | 99 const base::Callback<void(const std::vector<int>&)>& callback) |
100 const override; | 100 const override; |
101 GURL GetDocumentURL(PP_Instance pp_instance) const override; | 101 GURL GetDocumentURL(PP_Instance pp_instance) const override; |
102 | 102 |
| 103 // Returns whether the plugin is running in a secure context. |
| 104 bool IsSecureContext(PP_Instance pp_instance) const; |
| 105 |
103 void set_viewport_to_dip_scale(float viewport_to_dip_scale) { | 106 void set_viewport_to_dip_scale(float viewport_to_dip_scale) { |
104 DCHECK_LT(0, viewport_to_dip_scale_); | 107 DCHECK_LT(0, viewport_to_dip_scale_); |
105 viewport_to_dip_scale_ = viewport_to_dip_scale; | 108 viewport_to_dip_scale_ = viewport_to_dip_scale; |
106 } | 109 } |
107 | 110 |
108 private: | 111 private: |
109 RendererPpapiHostImpl(PluginModule* module, | 112 RendererPpapiHostImpl(PluginModule* module, |
110 ppapi::proxy::HostDispatcher* dispatcher, | 113 ppapi::proxy::HostDispatcher* dispatcher, |
111 const ppapi::PpapiPermissions& permissions); | 114 const ppapi::PpapiPermissions& permissions); |
112 RendererPpapiHostImpl(PluginModule* module, | 115 RendererPpapiHostImpl(PluginModule* module, |
(...skipping 26 matching lines...) Expand all Loading... |
139 | 142 |
140 // The scale between the viewport and dip. | 143 // The scale between the viewport and dip. |
141 float viewport_to_dip_scale_ = 1.0f; | 144 float viewport_to_dip_scale_ = 1.0f; |
142 | 145 |
143 DISALLOW_COPY_AND_ASSIGN(RendererPpapiHostImpl); | 146 DISALLOW_COPY_AND_ASSIGN(RendererPpapiHostImpl); |
144 }; | 147 }; |
145 | 148 |
146 } // namespace content | 149 } // namespace content |
147 | 150 |
148 #endif // CONTENT_RENDERER_PEPPER_RENDERER_PPAPI_HOST_IMPL_H_ | 151 #endif // CONTENT_RENDERER_PEPPER_RENDERER_PPAPI_HOST_IMPL_H_ |
OLD | NEW |