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 #include "chrome/browser/renderer_host/pepper/pepper_flash_browser_host.h" | 5 #include "chrome/browser/renderer_host/pepper/pepper_flash_browser_host.h" |
6 | 6 |
7 #include "base/time/time.h" | 7 #include "base/time/time.h" |
8 #include "chrome/browser/content_settings/cookie_settings.h" | 8 #include "chrome/browser/content_settings/cookie_settings.h" |
9 #include "chrome/browser/profiles/profile.h" | 9 #include "chrome/browser/profiles/profile.h" |
10 #include "content/public/browser/browser_context.h" | 10 #include "content/public/browser/browser_context.h" |
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
50 } // namespace | 50 } // namespace |
51 | 51 |
52 PepperFlashBrowserHost::PepperFlashBrowserHost( | 52 PepperFlashBrowserHost::PepperFlashBrowserHost( |
53 BrowserPpapiHost* host, | 53 BrowserPpapiHost* host, |
54 PP_Instance instance, | 54 PP_Instance instance, |
55 PP_Resource resource) | 55 PP_Resource resource) |
56 : ResourceHost(host->GetPpapiHost(), instance, resource), | 56 : ResourceHost(host->GetPpapiHost(), instance, resource), |
57 host_(host), | 57 host_(host), |
58 weak_factory_(this) { | 58 weak_factory_(this) { |
59 int unused; | 59 int unused; |
60 host->GetRenderViewIDsForInstance(instance, &render_process_id_, &unused); | 60 host->GetRenderFrameIDsForInstance(instance, &render_process_id_, &unused); |
61 } | 61 } |
62 | 62 |
63 PepperFlashBrowserHost::~PepperFlashBrowserHost() { | 63 PepperFlashBrowserHost::~PepperFlashBrowserHost() { |
64 } | 64 } |
65 | 65 |
66 int32_t PepperFlashBrowserHost::OnResourceMessageReceived( | 66 int32_t PepperFlashBrowserHost::OnResourceMessageReceived( |
67 const IPC::Message& msg, | 67 const IPC::Message& msg, |
68 ppapi::host::HostMessageContext* context) { | 68 ppapi::host::HostMessageContext* context) { |
69 IPC_BEGIN_MESSAGE_MAP(PepperFlashBrowserHost, msg) | 69 IPC_BEGIN_MESSAGE_MAP(PepperFlashBrowserHost, msg) |
70 PPAPI_DISPATCH_HOST_RESOURCE_CALL_0(PpapiHostMsg_Flash_UpdateActivity, | 70 PPAPI_DISPATCH_HOST_RESOURCE_CALL_0(PpapiHostMsg_Flash_UpdateActivity, |
(...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
151 if (!cookie_settings_->IsReadingCookieAllowed(document_url, plugin_url)) | 151 if (!cookie_settings_->IsReadingCookieAllowed(document_url, plugin_url)) |
152 restrictions = PP_FLASHLSORESTRICTIONS_BLOCK; | 152 restrictions = PP_FLASHLSORESTRICTIONS_BLOCK; |
153 else if (cookie_settings_->IsCookieSessionOnly(plugin_url)) | 153 else if (cookie_settings_->IsCookieSessionOnly(plugin_url)) |
154 restrictions = PP_FLASHLSORESTRICTIONS_IN_MEMORY; | 154 restrictions = PP_FLASHLSORESTRICTIONS_IN_MEMORY; |
155 } | 155 } |
156 SendReply(reply_context, PpapiPluginMsg_Flash_GetLocalDataRestrictionsReply( | 156 SendReply(reply_context, PpapiPluginMsg_Flash_GetLocalDataRestrictionsReply( |
157 static_cast<int32_t>(restrictions))); | 157 static_cast<int32_t>(restrictions))); |
158 } | 158 } |
159 | 159 |
160 } // namespace chrome | 160 } // namespace chrome |
OLD | NEW |