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

Side by Side Diff: chromecast/renderer/cast_content_renderer_client.cc

Issue 2616493005: Mojo JS bindings: remove the connection module. (Closed)
Patch Set: Created 3 years, 11 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
« no previous file with comments | « no previous file | content/content_resources.grd » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 "chromecast/renderer/cast_content_renderer_client.h" 5 #include "chromecast/renderer/cast_content_renderer_client.h"
6 6
7 #include <stdint.h> 7 #include <stdint.h>
8 #include <string> 8 #include <string>
9 9
10 #include "base/command_line.h" 10 #include "base/command_line.h"
(...skipping 158 matching lines...) Expand 10 before | Expand all | Expand 10 after
169 // Inject JavaScript files in the correct dependency order. 169 // Inject JavaScript files in the correct dependency order.
170 static const int mojo_resource_ids[] = { 170 static const int mojo_resource_ids[] = {
171 IDR_MOJO_UNICODE_JS, 171 IDR_MOJO_UNICODE_JS,
172 IDR_MOJO_BUFFER_JS, 172 IDR_MOJO_BUFFER_JS,
173 IDR_MOJO_INTERFACE_TYPES_JS, 173 IDR_MOJO_INTERFACE_TYPES_JS,
174 IDR_MOJO_CODEC_JS, 174 IDR_MOJO_CODEC_JS,
175 IDR_MOJO_CONNECTOR_JS, 175 IDR_MOJO_CONNECTOR_JS,
176 IDR_MOJO_VALIDATOR_JS, 176 IDR_MOJO_VALIDATOR_JS,
177 IDR_MOJO_ROUTER_JS, 177 IDR_MOJO_ROUTER_JS,
178 IDR_MOJO_BINDINGS_JS, 178 IDR_MOJO_BINDINGS_JS,
179 IDR_MOJO_CONNECTION_JS,
180 }; 179 };
181 for (size_t i = 0; i < arraysize(mojo_resource_ids); i++) { 180 for (size_t i = 0; i < arraysize(mojo_resource_ids); i++) {
182 ExecuteJavaScript(render_frame, mojo_resource_ids[i]); 181 ExecuteJavaScript(render_frame, mojo_resource_ids[i]);
183 } 182 }
184 } 183 }
185 184
186 void ExecuteJavaScript(content::RenderFrame* render_frame, int resource_id) { 185 void ExecuteJavaScript(content::RenderFrame* render_frame, int resource_id) {
187 const std::string& js_string = ui::ResourceBundle::GetSharedInstance() 186 const std::string& js_string = ui::ResourceBundle::GetSharedInstance()
188 .GetRawDataResource(resource_id) 187 .GetRawDataResource(resource_id)
189 .as_string(); 188 .as_string();
190 render_frame->ExecuteJavaScript(base::UTF8ToUTF16(js_string)); 189 render_frame->ExecuteJavaScript(base::UTF8ToUTF16(js_string));
191 } 190 }
192 191
193 } // namespace shell 192 } // namespace shell
194 } // namespace chromecast 193 } // namespace chromecast
OLDNEW
« no previous file with comments | « no previous file | content/content_resources.grd » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698