OLD | NEW |
(Empty) | |
| 1 // Copyright (c) 2013 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 CHROME_BROWSER_EXTENSIONS_API_PAGE_LAUNCHER_PAGE_LAUNCHER_API_H_ |
| 6 #define CHROME_BROWSER_EXTENSIONS_API_PAGE_LAUNCHER_PAGE_LAUNCHER_API_H_ |
| 7 |
| 8 #include <string> |
| 9 |
| 10 #include "base/basictypes.h" |
| 11 #include "base/memory/scoped_ptr.h" |
| 12 #include "chrome/browser/extensions/api/profile_keyed_api_factory.h" |
| 13 |
| 14 class GURL; |
| 15 class Profile; |
| 16 |
| 17 namespace extensions { |
| 18 |
| 19 class PageLauncherAPI : public ProfileKeyedAPI { |
| 20 public: |
| 21 explicit PageLauncherAPI(Profile* profile); |
| 22 virtual ~PageLauncherAPI(); |
| 23 |
| 24 static void DispatchOnClickedEvent(Profile* profile, |
| 25 const std::string& extension_id, |
| 26 const GURL& url, |
| 27 const std::string& mimetype, |
| 28 const std::string* page_title, |
| 29 const std::string* selected_text); |
| 30 |
| 31 // ProfileKeyedAPI implementation. |
| 32 static ProfileKeyedAPIFactory<PageLauncherAPI>* GetFactoryInstance(); |
| 33 |
| 34 private: |
| 35 friend class ProfileKeyedAPIFactory<PageLauncherAPI>; |
| 36 |
| 37 // ProfileKeyedAPI implementation. |
| 38 static const char* service_name() { |
| 39 return "PageLauncherAPI"; |
| 40 } |
| 41 |
| 42 DISALLOW_COPY_AND_ASSIGN(PageLauncherAPI); |
| 43 }; |
| 44 |
| 45 } // namespace extensions |
| 46 |
| 47 |
| 48 #endif // CHROME_BROWSER_EXTENSIONS_API_PAGE_LAUNCHER_PAGE_LAUNCHER_API_H_ |
OLD | NEW |