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

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

Issue 2038963002: [Offline Pages] Link the internals page with the offline model and request (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: More code review comment fixes Created 4 years, 6 months 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
OLDNEW
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 "content/public/browser/web_ui_message_handler.h" 5 #include "content/public/browser/web_ui_message_handler.h"
6 6
7 #include "base/logging.h" 7 #include "base/logging.h"
8 #include "base/strings/string_number_conversions.h" 8 #include "base/strings/string_number_conversions.h"
9 #include "base/strings/utf_string_conversions.h" 9 #include "base/strings/utf_string_conversions.h"
10 #include "base/values.h" 10 #include "base/values.h"
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after
74 } 74 }
75 75
76 void WebUIMessageHandler::ResolveJavascriptCallback( 76 void WebUIMessageHandler::ResolveJavascriptCallback(
77 const base::Value& callback_id, 77 const base::Value& callback_id,
78 const base::Value& response) { 78 const base::Value& response) {
79 // cr.webUIResponse is a global JS function exposed from cr.js. 79 // cr.webUIResponse is a global JS function exposed from cr.js.
80 CallJavascriptFunction("cr.webUIResponse", callback_id, 80 CallJavascriptFunction("cr.webUIResponse", callback_id,
81 base::FundamentalValue(true), response); 81 base::FundamentalValue(true), response);
82 } 82 }
83 83
84 void WebUIMessageHandler::ResolveJavascriptCallback(
dpapad 2016/06/10 21:08:55 I would prefer to not overload ResolveJavascriptCa
Dan Beam 2016/06/13 19:13:30 the C++ style guide discourages overloading: https
85 const std::string& callback_id,
86 const base::Value& response) {
87 ResolveJavascriptCallback(base::StringValue(callback_id), response);
88 }
89
84 void WebUIMessageHandler::RejectJavascriptCallback( 90 void WebUIMessageHandler::RejectJavascriptCallback(
85 const base::Value& callback_id, 91 const base::Value& callback_id,
86 const base::Value& response) { 92 const base::Value& response) {
87 // cr.webUIResponse is a global JS function exposed from cr.js. 93 // cr.webUIResponse is a global JS function exposed from cr.js.
88 CallJavascriptFunction("cr.webUIResponse", callback_id, 94 CallJavascriptFunction("cr.webUIResponse", callback_id,
89 base::FundamentalValue(false), response); 95 base::FundamentalValue(false), response);
90 } 96 }
91 97
92 } // namespace content 98 } // namespace content
OLDNEW
« no previous file with comments | « chrome/browser/ui/webui/offline_internals_ui.cc ('k') | content/public/browser/web_ui_message_handler.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698