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