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/ui/webui/uber/uber_ui.h" | 5 #include "chrome/browser/ui/webui/uber/uber_ui.h" |
6 | 6 |
7 #include "base/stl_util.h" | 7 #include "base/stl_util.h" |
8 #include "base/utf_string_conversions.h" | 8 #include "base/utf_string_conversions.h" |
9 #include "chrome/browser/profiles/profile.h" | 9 #include "chrome/browser/profiles/profile.h" |
10 #include "chrome/browser/ui/webui/chrome_url_data_manager.h" | 10 #include "chrome/browser/ui/webui/chrome_url_data_manager.h" |
(...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
99 const ListValue& args) { | 99 const ListValue& args) { |
100 // Find the appropriate subpage and forward the message. | 100 // Find the appropriate subpage and forward the message. |
101 SubpageMap::iterator subpage = sub_uis_.find(source_url.GetOrigin().spec()); | 101 SubpageMap::iterator subpage = sub_uis_.find(source_url.GetOrigin().spec()); |
102 if (subpage == sub_uis_.end()) { | 102 if (subpage == sub_uis_.end()) { |
103 // The message was sent from the uber page itself. | 103 // The message was sent from the uber page itself. |
104 DCHECK_EQ(std::string(chrome::kChromeUIUberHost), source_url.host()); | 104 DCHECK_EQ(std::string(chrome::kChromeUIUberHost), source_url.host()); |
105 return false; | 105 return false; |
106 } | 106 } |
107 | 107 |
108 // The message was sent from a subpage. | 108 // The message was sent from a subpage. |
109 return subpage->second->controller()->OverrideHandleWebUIMessage( | 109 // TODO(jam) fix this to use interface |
110 source_url, message, args); | 110 //return subpage->second->controller()->OverrideHandleWebUIMessage( |
| 111 // source_url, message, args); |
| 112 subpage->second->OnWebUISend(source_url, message, args); |
| 113 return true; |
111 } | 114 } |
OLD | NEW |