OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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_CHROMEOS_NOTIFICATIONS_BALLOON_VIEW_HOST_H_ | 5 #ifndef CHROME_BROWSER_CHROMEOS_NOTIFICATIONS_BALLOON_VIEW_HOST_H_ |
6 #define CHROME_BROWSER_CHROMEOS_NOTIFICATIONS_BALLOON_VIEW_HOST_H_ | 6 #define CHROME_BROWSER_CHROMEOS_NOTIFICATIONS_BALLOON_VIEW_HOST_H_ |
7 #pragma once | 7 #pragma once |
8 | 8 |
9 #include "chrome/browser/ui/views/notifications/balloon_view_host.h" | 9 #include "chrome/browser/ui/views/notifications/balloon_view_host.h" |
10 | 10 |
(...skipping 16 matching lines...) Expand all Loading... |
27 virtual ~BalloonViewHost(); | 27 virtual ~BalloonViewHost(); |
28 | 28 |
29 // Adds a callback for WebUI message. Returns true if the callback | 29 // Adds a callback for WebUI message. Returns true if the callback |
30 // is succssfully registered, or false otherwise. It fails to add if | 30 // is succssfully registered, or false otherwise. It fails to add if |
31 // a callback for given message already exists. The callback object | 31 // a callback for given message already exists. The callback object |
32 // is owned and deleted by callee. | 32 // is owned and deleted by callee. |
33 bool AddWebUIMessageCallback(const std::string& message, | 33 bool AddWebUIMessageCallback(const std::string& message, |
34 MessageCallback* callback); | 34 MessageCallback* callback); |
35 | 35 |
36 // Process WebUI message. | 36 // Process WebUI message. |
37 virtual void ProcessWebUIMessage(const ViewHostMsg_DomMessage_Params& params); | 37 virtual void ProcessWebUIMessage( |
| 38 const ExtensionHostMsg_DomMessage_Params& params); |
38 | 39 |
39 private: | 40 private: |
40 // A map of message name -> message handling callback. | 41 // A map of message name -> message handling callback. |
41 typedef std::map<std::string, MessageCallback*> MessageCallbackMap; | 42 typedef std::map<std::string, MessageCallback*> MessageCallbackMap; |
42 MessageCallbackMap message_callbacks_; | 43 MessageCallbackMap message_callbacks_; |
43 | 44 |
44 DISALLOW_COPY_AND_ASSIGN(BalloonViewHost); | 45 DISALLOW_COPY_AND_ASSIGN(BalloonViewHost); |
45 }; | 46 }; |
46 | 47 |
47 } // namespace chromeos | 48 } // namespace chromeos |
48 | 49 |
49 #endif // CHROME_BROWSER_CHROMEOS_NOTIFICATIONS_BALLOON_VIEW_HOST_H_ | 50 #endif // CHROME_BROWSER_CHROMEOS_NOTIFICATIONS_BALLOON_VIEW_HOST_H_ |
OLD | NEW |