Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(162)

Side by Side Diff: chrome/browser/extensions/api/notification/notification_api.h

Issue 11116016: Hook up API to notification_ui_manager. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 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 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef CHROME_BROWSER_EXTENSIONS_API_NOTIFICATION_NOTIFICATION_API_H_ 5 #ifndef CHROME_BROWSER_EXTENSIONS_API_NOTIFICATION_NOTIFICATION_API_H_
6 #define CHROME_BROWSER_EXTENSIONS_API_NOTIFICATION_NOTIFICATION_API_H_ 6 #define CHROME_BROWSER_EXTENSIONS_API_NOTIFICATION_NOTIFICATION_API_H_
7 7
8 #include "base/memory/ref_counted.h" 8 #include "base/memory/ref_counted.h"
9 #include "chrome/browser/extensions/api/api_function.h" 9 #include "chrome/browser/extensions/api/api_function.h"
10 #include "chrome/browser/extensions/api/api_resource_manager.h" 10 #include "chrome/browser/extensions/api/api_resource_manager.h"
11 #include "chrome/browser/extensions/extension_function.h" 11 #include "chrome/browser/extensions/extension_function.h"
12 #include "chrome/common/extensions/api/experimental_notification.h" 12 #include "chrome/common/extensions/api/experimental_notification.h"
13 13
14 #include <string> 14 #include <string>
15 15
16 namespace extensions { 16 namespace extensions {
17 17
18 class NotificationShowFunction : public AsyncApiFunction { 18 class ApiResourceEventNotifier;
19
20 class NotificationShowFunction : public ApiFunction {
19 public: 21 public:
20 DECLARE_EXTENSION_FUNCTION_NAME("notification.show") 22 DECLARE_EXTENSION_FUNCTION_NAME("experimental.notification.show")
asargent_no_longer_on_chrome 2012/10/15 19:26:25 style nit: I think we usually put the DECLARE_EXTE
21 23
22 NotificationShowFunction(); 24 NotificationShowFunction();
23 25
24 // AsyncApiFunction: 26 // UIThreadExtensionFunction:
dharcourt 2012/10/12 22:38:50 For my education: Both the ApiFunction superclass
miket_OOO 2012/10/15 17:13:11 I think you're asking a general C++ question, but
25 virtual bool Prepare() OVERRIDE; 27 virtual bool RunImpl() OVERRIDE;
26 virtual void Work() OVERRIDE;
27 virtual bool Respond() OVERRIDE;
28 28
29 protected: 29 protected:
30 virtual ~NotificationShowFunction(); 30 virtual ~NotificationShowFunction();
31 31
32 private: 32 private:
33 scoped_ptr<api::experimental_notification::Show::Params> params_; 33 scoped_ptr<api::experimental_notification::Show::Params> params_;
34 int src_id_;
35 ApiResourceEventNotifier* event_notifier_;
34 }; 36 };
35 37
36 } // namespace extensions 38 } // namespace extensions
37 39
38 #endif // CHROME_BROWSER_EXTENSIONS_API_NOTIFICATION_NOTIFICATION_API_H_ 40 #endif // CHROME_BROWSER_EXTENSIONS_API_NOTIFICATION_NOTIFICATION_API_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698