Chromium Code Reviews| Index: chrome/browser/extensions/api/page_launcher/page_launcher_api.h |
| diff --git a/chrome/browser/extensions/api/page_launcher/page_launcher_api.h b/chrome/browser/extensions/api/page_launcher/page_launcher_api.h |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..e2d74954c981b4f1b0a936d899ce9d84eb80924e |
| --- /dev/null |
| +++ b/chrome/browser/extensions/api/page_launcher/page_launcher_api.h |
| @@ -0,0 +1,47 @@ |
| +// Copyright (c) 2013 The Chromium Authors. All rights reserved. |
| +// Use of this source code is governed by a BSD-style license that can be |
| +// found in the LICENSE file. |
| + |
| +#ifndef CHROME_BROWSER_EXTENSIONS_API_PAGE_LAUNCHER_PAGE_LAUNCHER_API_H_ |
| +#define CHROME_BROWSER_EXTENSIONS_API_PAGE_LAUNCHER_PAGE_LAUNCHER_API_H_ |
| + |
| +#include <string> |
| + |
| +#include "base/basictypes.h" |
| +#include "base/memory/scoped_ptr.h" |
| +#include "chrome/browser/extensions/api/profile_keyed_api_factory.h" |
| + |
| +class Profile; |
| + |
| +namespace extensions { |
| + |
| +class PageLauncherAPI : public ProfileKeyedAPI { |
| + public: |
| + explicit PageLauncherAPI(Profile* profile); |
| + virtual ~PageLauncherAPI(); |
| + |
| + static void DispatchOnClickedEvent(Profile* profile, |
| + const std::string& extension_id, |
| + const std::string& url, |
| + const std::string& mimetype, |
| + scoped_ptr<std::string> page_title, |
| + scoped_ptr<std::string> selected_text); |
| + |
| + // ProfileKeyedAPI implementation. |
| + static ProfileKeyedAPIFactory<PageLauncherAPI>* GetFactoryInstance(); |
| + |
| + private: |
| + friend class ProfileKeyedAPIFactory<PageLauncherAPI>; |
| + |
| + // ProfileKeyedAPI implementation. |
| + static const char* service_name() { |
| + return "PageLauncherAPI"; |
| + } |
| + |
| + DISALLOW_COPY_AND_ASSIGN(PageLauncherAPI); |
| +}; |
| + |
| +} // namespace extensions |
| + |
| + |
| +#endif // CHROME_BROWSER_EXTENSIONS_API_PAGE_LAUNCHER_PAGE_LAUNCHER_API_H_ |
|
skare_
2013/01/30 00:49:51
nit: add newline at EOF, here and in the .cc
Rune Fevang
2013/01/30 01:32:12
Not sure why the linter thinks its missing, it's c
|