| 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_FLASH_BROWSER_HOST_H_ | 5 #ifndef CONTENT_RENDERER_PEPPER_PEPPER_FLASH_BROWSER_HOST_H_ |
| 6 #define CONTENT_RENDERER_PEPPER_PEPPER_FLASH_BROWSER_HOST_H_ | 6 #define CONTENT_RENDERER_PEPPER_PEPPER_FLASH_BROWSER_HOST_H_ |
| 7 | 7 |
| 8 #include "base/basictypes.h" | 8 #include "base/basictypes.h" |
| 9 #include "base/memory/weak_ptr.h" |
| 9 #include "ppapi/host/host_message_context.h" | 10 #include "ppapi/host/host_message_context.h" |
| 10 #include "ppapi/host/resource_host.h" | 11 #include "ppapi/host/resource_host.h" |
| 11 | 12 |
| 13 class GURL; |
| 14 |
| 12 namespace content { | 15 namespace content { |
| 13 | 16 |
| 14 class BrowserPpapiHost; | 17 class BrowserPpapiHost; |
| 18 class ResourceContext; |
| 15 | 19 |
| 16 class PepperFlashBrowserHost : public ppapi::host::ResourceHost { | 20 class PepperFlashBrowserHost |
| 21 : public ppapi::host::ResourceHost, |
| 22 public base::SupportsWeakPtr<PepperFlashBrowserHost> { |
| 17 public: | 23 public: |
| 18 PepperFlashBrowserHost(BrowserPpapiHost* host, | 24 PepperFlashBrowserHost(BrowserPpapiHost* host, |
| 19 PP_Instance instance, | 25 PP_Instance instance, |
| 20 PP_Resource resource); | 26 PP_Resource resource); |
| 21 virtual ~PepperFlashBrowserHost(); | 27 virtual ~PepperFlashBrowserHost(); |
| 22 | 28 |
| 23 // ppapi::host::ResourceHost override. | 29 // ppapi::host::ResourceHost override. |
| 24 virtual int32_t OnResourceMessageReceived( | 30 virtual int32_t OnResourceMessageReceived( |
| 25 const IPC::Message& msg, | 31 const IPC::Message& msg, |
| 26 ppapi::host::HostMessageContext* context) OVERRIDE; | 32 ppapi::host::HostMessageContext* context) OVERRIDE; |
| 27 | 33 |
| 28 private: | 34 private: |
| 29 int32_t OnMsgUpdateActivity(ppapi::host::HostMessageContext* host_context); | 35 int32_t OnMsgUpdateActivity(ppapi::host::HostMessageContext* host_context); |
| 36 int32_t OnMsgGetLocalDataRestrictions( |
| 37 ppapi::host::HostMessageContext* context); |
| 38 |
| 39 void GetLocalDataRestrictions(ppapi::host::ReplyMessageContext reply_context, |
| 40 const GURL& document_url, |
| 41 const GURL& plugin_url, |
| 42 ResourceContext* resource_context); |
| 43 |
| 44 BrowserPpapiHost* host_; |
| 45 int render_process_id_; |
| 46 ResourceContext* resource_context_; |
| 30 | 47 |
| 31 DISALLOW_COPY_AND_ASSIGN(PepperFlashBrowserHost); | 48 DISALLOW_COPY_AND_ASSIGN(PepperFlashBrowserHost); |
| 32 }; | 49 }; |
| 33 | 50 |
| 34 } // namespace content | 51 } // namespace content |
| 35 | 52 |
| 36 #endif // CONTENT_RENDERER_PEPPER_PEPPER_FLASH_BROWSER_HOST_H_ | 53 #endif // CONTENT_RENDERER_PEPPER_PEPPER_FLASH_BROWSER_HOST_H_ |
| OLD | NEW |