| 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_BROWSER_RENDERER_HOST_PEPPER_BROWSER_PPAPI_HOST_IMPL_H_ | 5 #ifndef CONTENT_BROWSER_RENDERER_HOST_PEPPER_BROWSER_PPAPI_HOST_IMPL_H_ |
| 6 #define CONTENT_BROWSER_RENDERER_HOST_PEPPER_BROWSER_PPAPI_HOST_IMPL_H_ | 6 #define CONTENT_BROWSER_RENDERER_HOST_PEPPER_BROWSER_PPAPI_HOST_IMPL_H_ |
| 7 | 7 |
| 8 #include <map> | 8 #include <map> |
| 9 #include <string> | 9 #include <string> |
| 10 #include <utility> |
| 10 | 11 |
| 11 #include "base/compiler_specific.h" | 12 #include "base/compiler_specific.h" |
| 12 #include "base/containers/scoped_ptr_hash_map.h" | 13 #include "base/containers/scoped_ptr_hash_map.h" |
| 13 #include "base/files/file_path.h" | 14 #include "base/files/file_path.h" |
| 14 #include "base/macros.h" | 15 #include "base/macros.h" |
| 15 #include "base/memory/ref_counted.h" | 16 #include "base/memory/ref_counted.h" |
| 16 #include "base/memory/weak_ptr.h" | 17 #include "base/memory/weak_ptr.h" |
| 17 #include "base/observer_list.h" | 18 #include "base/observer_list.h" |
| 18 #include "base/process/process.h" | 19 #include "base/process/process.h" |
| 19 #include "content/browser/renderer_host/pepper/content_browser_pepper_host_facto
ry.h" | 20 #include "content/browser/renderer_host/pepper/content_browser_pepper_host_facto
ry.h" |
| (...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 71 GURL GetPluginURLForInstance(PP_Instance instance) override; | 72 GURL GetPluginURLForInstance(PP_Instance instance) override; |
| 72 void SetOnKeepaliveCallback( | 73 void SetOnKeepaliveCallback( |
| 73 const BrowserPpapiHost::OnKeepaliveCallback& callback) override; | 74 const BrowserPpapiHost::OnKeepaliveCallback& callback) override; |
| 74 | 75 |
| 75 // Whether the plugin context is secure. That is, it is served from a secure | 76 // Whether the plugin context is secure. That is, it is served from a secure |
| 76 // origin and it is embedded within a hierarchy of secure frames. This value | 77 // origin and it is embedded within a hierarchy of secure frames. This value |
| 77 // comes from the renderer so should not be trusted. It is used for metrics. | 78 // comes from the renderer so should not be trusted. It is used for metrics. |
| 78 bool IsPotentiallySecurePluginContext(PP_Instance instance); | 79 bool IsPotentiallySecurePluginContext(PP_Instance instance); |
| 79 | 80 |
| 80 void set_plugin_process(base::Process process) { | 81 void set_plugin_process(base::Process process) { |
| 81 plugin_process_ = process.Pass(); | 82 plugin_process_ = std::move(process); |
| 82 } | 83 } |
| 83 | 84 |
| 84 bool external_plugin() const { return external_plugin_; } | 85 bool external_plugin() const { return external_plugin_; } |
| 85 | 86 |
| 86 // These two functions are notifications that an instance has been created | 87 // These two functions are notifications that an instance has been created |
| 87 // or destroyed. They allow us to maintain a mapping of PP_Instance to data | 88 // or destroyed. They allow us to maintain a mapping of PP_Instance to data |
| 88 // associated with the instance including view IDs in the browser process. | 89 // associated with the instance including view IDs in the browser process. |
| 89 void AddInstance(PP_Instance instance, | 90 void AddInstance(PP_Instance instance, |
| 90 const PepperRendererInstanceData& renderer_instance_data); | 91 const PepperRendererInstanceData& renderer_instance_data); |
| 91 void DeleteInstance(PP_Instance instance); | 92 void DeleteInstance(PP_Instance instance); |
| (...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 165 scoped_refptr<HostMessageFilter> message_filter_; | 166 scoped_refptr<HostMessageFilter> message_filter_; |
| 166 | 167 |
| 167 BrowserPpapiHost::OnKeepaliveCallback on_keepalive_callback_; | 168 BrowserPpapiHost::OnKeepaliveCallback on_keepalive_callback_; |
| 168 | 169 |
| 169 DISALLOW_COPY_AND_ASSIGN(BrowserPpapiHostImpl); | 170 DISALLOW_COPY_AND_ASSIGN(BrowserPpapiHostImpl); |
| 170 }; | 171 }; |
| 171 | 172 |
| 172 } // namespace content | 173 } // namespace content |
| 173 | 174 |
| 174 #endif // CONTENT_BROWSER_RENDERER_HOST_PEPPER_BROWSER_PPAPI_HOST_IMPL_H_ | 175 #endif // CONTENT_BROWSER_RENDERER_HOST_PEPPER_BROWSER_PPAPI_HOST_IMPL_H_ |
| OLD | NEW |