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

Unified Diff: components/devtools_bridge/client/web_client_controller.cc

Issue 746663002: Stub for WebRTCDeviceProvider (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@webclient
Patch Set: Created 6 years, 1 month 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 side-by-side diff with in-line comments
Download patch
Index: components/devtools_bridge/client/web_client_controller.cc
diff --git a/components/devtools_bridge/client/web_client_controller.cc b/components/devtools_bridge/client/web_client_controller.cc
new file mode 100644
index 0000000000000000000000000000000000000000..5bdad40a5af4f121a16eb452221cafa48517f1dc
--- /dev/null
+++ b/components/devtools_bridge/client/web_client_controller.cc
@@ -0,0 +1,35 @@
+// Copyright (c) 2011 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#include "components/devtools_bridge/client/web_client_controller.h"
+
+#include "base/memory/ref_counted_memory.h"
+#include "chrome/browser/profiles/profile.h"
+#include "content/public/browser/url_data_source.h"
+#include "content/public/browser/web_ui_data_source.h"
+#include "grit/devtools_bridge/web_client_resources_map.h"
+#include "net/url_request/url_request_context_getter.h"
+#include "ui/base/resource/resource_bundle.h"
+
+namespace devtools_bridge {
+
+WebClientController::WebClientController(content::WebUI* web_ui)
+ : content::WebUIController(web_ui) {
+ Profile* profile = Profile::FromWebUI(web_ui);
+
+ content::WebUIDataSource* source =
Tom Sepez 2014/11/21 22:10:37 Ah, here's the part I was worried about. Does thi
SeRya 2014/11/24 11:10:06 It works in the test app because I do registering
+ content::WebUIDataSource::Create("bridge");
+ source->DisableContentSecurityPolicy();
+
+ for (int i = 0; i != kWebClientSize; ++i) {
+ source->AddResourcePath(kWebClient[i].name, kWebClient[i].value);
+ }
+
+ content::WebUIDataSource::Add(profile, source);
+}
+
+WebClientController::~WebClientController() {
+}
+
+} // devtools_bridge

Powered by Google App Engine
This is Rietveld 408576698