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