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

Unified Diff: chrome/browser/ui/webui/external_web_dialog_ui.cc

Issue 10353007: Extract a minimal subset of WebDialogUI/WebDialogDelegate from src/chrome -> src/ui/web_dialogs Base URL: http://src.chromium.org/svn/trunk/src/
Patch Set: Created 8 years, 8 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/ui/webui/external_web_dialog_ui.cc
===================================================================
--- chrome/browser/ui/webui/external_web_dialog_ui.cc (revision 0)
+++ chrome/browser/ui/webui/external_web_dialog_ui.cc (revision 0)
@@ -0,0 +1,30 @@
+// Copyright (c) 2012 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 "chrome/browser/ui/webui/external_web_dialog_ui.h"
+
+#include "base/bind.h"
+#include "base/bind_helpers.h"
+#include "base/lazy_instance.h"
+#include "base/property_bag.h"
+#include "base/values.h"
+#include "content/public/browser/notification_service.h"
+#include "content/public/browser/render_view_host.h"
+#include "content/public/browser/web_contents.h"
+#include "content/public/browser/web_ui.h"
+#include "content/public/browser/web_ui_message_handler.h"
+#include "content/public/common/bindings_policy.h"
+
+
+ExternalWebDialogUI::ExternalWebDialogUI(content::WebUI* web_ui)
+ : web_dialogs::WebDialogUI(web_ui) {
+ // Non-file based UI needs to not have access to the Web UI bindings
+ // for security reasons. The code hosting the dialog should provide
+ // dialog specific functionality through other bindings and methods
+ // that are scoped in duration to the dialogs existence.
+ web_ui->SetBindings(web_ui->GetBindings() & ~content::BINDINGS_POLICY_WEB_UI);
+}
+
+ExternalWebDialogUI::~ExternalWebDialogUI() {
+}

Powered by Google App Engine
This is Rietveld 408576698