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