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

Side by Side Diff: content/browser/webui/web_ui.cc

Issue 8889041: first cut at uber page (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: total different approach Created 9 years 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) 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 #include "content/browser/webui/web_ui.h" 5 #include "content/browser/webui/web_ui.h"
6 6
7 #include "base/i18n/rtl.h" 7 #include "base/i18n/rtl.h"
8 #include "base/json/json_writer.h" 8 #include "base/json/json_writer.h"
9 #include "base/stl_util.h" 9 #include "base/stl_util.h"
10 #include "base/string_number_conversions.h" 10 #include "base/string_number_conversions.h"
(...skipping 155 matching lines...) Expand 10 before | Expand all | Expand 10 after
166 result.first->second = callback; 166 result.first->second = callback;
167 } 167 }
168 168
169 // WebUI, protected: ---------------------------------------------------------- 169 // WebUI, protected: ----------------------------------------------------------
170 170
171 void WebUI::AddMessageHandler(WebUIMessageHandler* handler) { 171 void WebUI::AddMessageHandler(WebUIMessageHandler* handler) {
172 handlers_.push_back(handler); 172 handlers_.push_back(handler);
173 } 173 }
174 174
175 void WebUI::ExecuteJavascript(const string16& javascript) { 175 void WebUI::ExecuteJavascript(const string16& javascript) {
176 tab_contents_->render_view_host()->ExecuteJavascriptInWebFrame(string16(), 176 tab_contents_->render_view_host()->ExecuteJavascriptInWebFrame(
177 javascript); 177 ASCIIToUTF16(frame_xpath_), javascript);
178 } 178 }
179 179
180 /////////////////////////////////////////////////////////////////////////////// 180 ///////////////////////////////////////////////////////////////////////////////
181 // WebUIMessageHandler 181 // WebUIMessageHandler
182 WebUIMessageHandler::WebUIMessageHandler() : web_ui_(NULL) { 182 WebUIMessageHandler::WebUIMessageHandler() : web_ui_(NULL) {
183 } 183 }
184 184
185 WebUIMessageHandler::~WebUIMessageHandler() { 185 WebUIMessageHandler::~WebUIMessageHandler() {
186 } 186 }
187 187
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after
242 return false; 242 return false;
243 } 243 }
244 244
245 string16 WebUIMessageHandler::ExtractStringValue(const ListValue* value) { 245 string16 WebUIMessageHandler::ExtractStringValue(const ListValue* value) {
246 string16 string16_value; 246 string16 string16_value;
247 if (value->GetString(0, &string16_value)) 247 if (value->GetString(0, &string16_value))
248 return string16_value; 248 return string16_value;
249 NOTREACHED(); 249 NOTREACHED();
250 return string16(); 250 return string16();
251 } 251 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698