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 scoped_ptr<std::string> page_title, | |
sky
2013/02/11 16:37:09
Why does this take scoped_ptr<std::string> why not
Rune Fevang
2013/02/11 20:52:52
To be able to distinguish between no title and an
sky
2013/02/11 21:57:47
I think const std::string* would be better than.
Rune Fevang
2013/02/11 23:36:46
Done.
| |
29 scoped_ptr<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 |