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 CHROME_BROWSER_RENDERER_HOST_PEPPER_PEPPER_FLASH_BROWSER_HOST_H_ | 5 #ifndef CHROME_BROWSER_RENDERER_HOST_PEPPER_PEPPER_FLASH_BROWSER_HOST_H_ |
| 6 #define CHROME_BROWSER_RENDERER_HOST_PEPPER_PEPPER_FLASH_BROWSER_HOST_H_ | 6 #define CHROME_BROWSER_RENDERER_HOST_PEPPER_PEPPER_FLASH_BROWSER_HOST_H_ |
| 7 | 7 |
| 8 #include "base/basictypes.h" | 8 #include "base/basictypes.h" |
| 9 #include "base/memory/ref_counted.h" | |
| 9 #include "base/memory/weak_ptr.h" | 10 #include "base/memory/weak_ptr.h" |
| 11 #include "ppapi/c/private/ppb_flash.h" | |
| 10 #include "ppapi/host/host_message_context.h" | 12 #include "ppapi/host/host_message_context.h" |
| 11 #include "ppapi/host/resource_host.h" | 13 #include "ppapi/host/resource_host.h" |
| 12 | 14 |
| 13 namespace base { | 15 namespace base { |
| 14 class Time; | 16 class Time; |
| 15 } | 17 } |
| 16 | 18 |
| 19 namespace chrome { | |
| 20 class FlashLSOSettingsHelper; | |
|
yzshen1
2012/12/29 02:04:05
nit: you could merge the namespace with the one be
raymes
2012/12/29 21:15:40
Done.
| |
| 21 } | |
| 22 | |
| 17 namespace content { | 23 namespace content { |
| 18 class BrowserPpapiHost; | 24 class BrowserPpapiHost; |
| 19 class ResourceContext; | |
| 20 } | 25 } |
| 21 | 26 |
| 22 class GURL; | 27 class GURL; |
| 23 | 28 |
| 24 namespace chrome { | 29 namespace chrome { |
| 25 | 30 |
| 26 class PepperFlashBrowserHost : public ppapi::host::ResourceHost { | 31 class PepperFlashBrowserHost : public ppapi::host::ResourceHost { |
| 27 public: | 32 public: |
| 28 PepperFlashBrowserHost(content::BrowserPpapiHost* host, | 33 PepperFlashBrowserHost(content::BrowserPpapiHost* host, |
| 29 PP_Instance instance, | 34 PP_Instance instance, |
| 30 PP_Resource resource); | 35 PP_Resource resource); |
| 31 virtual ~PepperFlashBrowserHost(); | 36 virtual ~PepperFlashBrowserHost(); |
| 32 | 37 |
| 33 // ppapi::host::ResourceHost override. | 38 // ppapi::host::ResourceHost override. |
| 34 virtual int32_t OnResourceMessageReceived( | 39 virtual int32_t OnResourceMessageReceived( |
| 35 const IPC::Message& msg, | 40 const IPC::Message& msg, |
| 36 ppapi::host::HostMessageContext* context) OVERRIDE; | 41 ppapi::host::HostMessageContext* context) OVERRIDE; |
| 37 | 42 |
| 38 private: | 43 private: |
| 39 int32_t OnMsgUpdateActivity(ppapi::host::HostMessageContext* host_context); | 44 int32_t OnMsgUpdateActivity(ppapi::host::HostMessageContext* host_context); |
| 40 int32_t OnMsgGetLocalTimeZoneOffset( | 45 int32_t OnMsgGetLocalTimeZoneOffset( |
| 41 ppapi::host::HostMessageContext* host_context, | 46 ppapi::host::HostMessageContext* host_context, |
| 42 const base::Time& t); | 47 const base::Time& t); |
| 43 int32_t OnMsgGetLocalDataRestrictions( | 48 int32_t OnMsgGetLocalDataRestrictions( |
| 44 ppapi::host::HostMessageContext* context); | 49 ppapi::host::HostMessageContext* context); |
| 45 | 50 |
| 46 void GetLocalDataRestrictions(ppapi::host::ReplyMessageContext reply_context, | 51 void OnGetLocalDataRestrictions( |
| 47 const GURL& document_url, | 52 ppapi::host::ReplyMessageContext reply_context, |
|
yzshen1
2012/12/29 02:04:05
Any reason to pass a value instead of a ref?
raymes
2012/12/29 21:15:40
Done.
| |
| 48 const GURL& plugin_url, | 53 PP_FlashLSORestrictions restrictions); |
| 49 content::ResourceContext* resource_context); | |
| 50 | 54 |
| 51 content::BrowserPpapiHost* host_; | 55 content::BrowserPpapiHost* host_; |
| 52 int render_process_id_; | |
| 53 // For fetching the Flash LSO settings. | |
| 54 content::ResourceContext* resource_context_; | |
| 55 base::WeakPtrFactory<PepperFlashBrowserHost> weak_factory_; | 56 base::WeakPtrFactory<PepperFlashBrowserHost> weak_factory_; |
| 57 scoped_refptr<FlashLSOSettingsHelper> lso_settings_helper_; | |
| 56 | 58 |
| 57 DISALLOW_COPY_AND_ASSIGN(PepperFlashBrowserHost); | 59 DISALLOW_COPY_AND_ASSIGN(PepperFlashBrowserHost); |
| 58 }; | 60 }; |
| 59 | 61 |
| 60 } // namespace chrome | 62 } // namespace chrome |
| 61 | 63 |
| 62 #endif // CHROME_BROWSER_RENDERER_HOST_PEPPER_PEPPER_FLASH_BROWSER_HOST_H_ | 64 #endif // CHROME_BROWSER_RENDERER_HOST_PEPPER_PEPPER_FLASH_BROWSER_HOST_H_ |
| OLD | NEW |