OLD | NEW |
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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 #include "chrome/browser/chromeos/notifications/balloon_view_host.h" | 5 #include "chrome/browser/chromeos/notifications/balloon_view_host.h" |
6 | 6 |
7 #include "base/stl_util-inl.h" | 7 #include "base/stl_util-inl.h" |
8 #include "base/values.h" | 8 #include "base/values.h" |
9 #include "chrome/common/render_messages.h" | 9 #include "chrome/common/render_messages.h" |
| 10 #include "chrome/common/render_messages_params.h" |
10 | 11 |
11 namespace chromeos { | 12 namespace chromeos { |
12 | 13 |
13 BalloonViewHost::~BalloonViewHost() { | 14 BalloonViewHost::~BalloonViewHost() { |
14 STLDeleteContainerPairSecondPointers(message_callbacks_.begin(), | 15 STLDeleteContainerPairSecondPointers(message_callbacks_.begin(), |
15 message_callbacks_.end()); | 16 message_callbacks_.end()); |
16 } | 17 } |
17 | 18 |
18 bool BalloonViewHost::AddDOMUIMessageCallback( | 19 bool BalloonViewHost::AddDOMUIMessageCallback( |
19 const std::string& message, | 20 const std::string& message, |
(...skipping 13 matching lines...) Expand all Loading... |
33 MessageCallbackMap::const_iterator callback = | 34 MessageCallbackMap::const_iterator callback = |
34 message_callbacks_.find(params.name); | 35 message_callbacks_.find(params.name); |
35 if (callback == message_callbacks_.end()) | 36 if (callback == message_callbacks_.end()) |
36 return; | 37 return; |
37 | 38 |
38 // Run callback. | 39 // Run callback. |
39 callback->second->Run(¶ms.arguments); | 40 callback->second->Run(¶ms.arguments); |
40 } | 41 } |
41 | 42 |
42 } // namespace chromeos | 43 } // namespace chromeos |
OLD | NEW |