| OLD | NEW |
| 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 #include "chrome/browser/chromeos/notifications/balloon_view_host_chromeos.h" | 5 #include "chrome/browser/chromeos/notifications/balloon_view_host_chromeos.h" |
| 6 | 6 |
| 7 #include <utility> | 7 #include <utility> |
| 8 | 8 |
| 9 #include "base/bind.h" | 9 #include "base/bind.h" |
| 10 #include "base/stl_util.h" | 10 #include "base/stl_util.h" |
| (...skipping 23 matching lines...) Expand all Loading... |
| 34 | 34 |
| 35 bool BalloonViewHost::HandleContextMenu( | 35 bool BalloonViewHost::HandleContextMenu( |
| 36 const content::ContextMenuParams& params) { | 36 const content::ContextMenuParams& params) { |
| 37 // No context menu for chromeos system notifications. | 37 // No context menu for chromeos system notifications. |
| 38 return true; | 38 return true; |
| 39 } | 39 } |
| 40 | 40 |
| 41 void BalloonViewHost::WebUISend(WebContents* tab, | 41 void BalloonViewHost::WebUISend(WebContents* tab, |
| 42 const GURL& source_url, | 42 const GURL& source_url, |
| 43 const std::string& name, | 43 const std::string& name, |
| 44 const ListValue& args) { | 44 const base::ListValue& args) { |
| 45 // Look up the callback for this message. | 45 // Look up the callback for this message. |
| 46 MessageCallbackMap::const_iterator callback = | 46 MessageCallbackMap::const_iterator callback = |
| 47 message_callbacks_.find(name); | 47 message_callbacks_.find(name); |
| 48 if (callback == message_callbacks_.end()) | 48 if (callback == message_callbacks_.end()) |
| 49 return; | 49 return; |
| 50 | 50 |
| 51 // Run callback. | 51 // Run callback. |
| 52 callback->second.Run(&args); | 52 callback->second.Run(&args); |
| 53 } | 53 } |
| 54 | 54 |
| 55 } // namespace chromeos | 55 } // namespace chromeos |
| OLD | NEW |