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_PUBLIC_BROWSER_PEPPER_FLASH_SETTINGS_HELPER_H_ | 5 #ifndef CONTENT_PUBLIC_BROWSER_PEPPER_FLASH_SETTINGS_HELPER_H_ |
6 #define CONTENT_PUBLIC_BROWSER_PEPPER_FLASH_SETTINGS_HELPER_H_ | 6 #define CONTENT_PUBLIC_BROWSER_PEPPER_FLASH_SETTINGS_HELPER_H_ |
7 | 7 |
8 #include "base/callback.h" | 8 #include "base/callback.h" |
9 #include "base/memory/ref_counted.h" | 9 #include "base/memory/ref_counted.h" |
10 #include "content/common/content_export.h" | 10 #include "content/common/content_export.h" |
11 | 11 |
| 12 namespace base { |
12 class FilePath; | 13 class FilePath; |
| 14 } |
13 | 15 |
14 namespace IPC { | 16 namespace IPC { |
15 struct ChannelHandle; | 17 struct ChannelHandle; |
16 } | 18 } |
17 | 19 |
18 namespace content { | 20 namespace content { |
19 | 21 |
20 // This class should only be used on the IO thread. | 22 // This class should only be used on the IO thread. |
21 class CONTENT_EXPORT PepperFlashSettingsHelper | 23 class CONTENT_EXPORT PepperFlashSettingsHelper |
22 : public base::RefCounted<PepperFlashSettingsHelper> { | 24 : public base::RefCounted<PepperFlashSettingsHelper> { |
23 public: | 25 public: |
24 static scoped_refptr<PepperFlashSettingsHelper> Create(); | 26 static scoped_refptr<PepperFlashSettingsHelper> Create(); |
25 | 27 |
26 // Called when OpenChannelToBroker() is completed. | 28 // Called when OpenChannelToBroker() is completed. |
27 // |success| indicates whether the channel is successfully opened to the | 29 // |success| indicates whether the channel is successfully opened to the |
28 // broker. On error, |channel_handle| is set to IPC::ChannelHandle(). | 30 // broker. On error, |channel_handle| is set to IPC::ChannelHandle(). |
29 typedef base::Callback<void(bool /* success */, | 31 typedef base::Callback<void(bool /* success */, |
30 const IPC::ChannelHandle& /* channel_handle */)> | 32 const IPC::ChannelHandle& /* channel_handle */)> |
31 OpenChannelCallback; | 33 OpenChannelCallback; |
32 virtual void OpenChannelToBroker(const FilePath& path, | 34 virtual void OpenChannelToBroker(const base::FilePath& path, |
33 const OpenChannelCallback& callback) = 0; | 35 const OpenChannelCallback& callback) = 0; |
34 | 36 |
35 protected: | 37 protected: |
36 friend class base::RefCounted<PepperFlashSettingsHelper>; | 38 friend class base::RefCounted<PepperFlashSettingsHelper>; |
37 virtual ~PepperFlashSettingsHelper() {} | 39 virtual ~PepperFlashSettingsHelper() {} |
38 }; | 40 }; |
39 | 41 |
40 } // namespace content | 42 } // namespace content |
41 | 43 |
42 #endif // CONTENT_PUBLIC_BROWSER_PEPPER_FLASH_SETTINGS_HELPER_H_ | 44 #endif // CONTENT_PUBLIC_BROWSER_PEPPER_FLASH_SETTINGS_HELPER_H_ |
OLD | NEW |