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

Side by Side Diff: ui/web_dialogs/web_dialog_ui.cc

Issue 10448066: Move the web dialogs code to src/ui/web_dialogs from src/chrome (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 8 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 | Annotate | Revision Log
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 "chrome/browser/ui/webui/web_dialog_ui.h" 5 #include "ui/web_dialogs/web_dialog_ui.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/bind_helpers.h" 8 #include "base/bind_helpers.h"
9 #include "base/lazy_instance.h" 9 #include "base/lazy_instance.h"
10 #include "base/property_bag.h" 10 #include "base/property_bag.h"
11 #include "base/values.h" 11 #include "base/values.h"
12 #include "chrome/browser/ui/webui/web_dialog_delegate.h"
13 #include "content/public/browser/notification_service.h" 12 #include "content/public/browser/notification_service.h"
14 #include "content/public/browser/render_view_host.h" 13 #include "content/public/browser/render_view_host.h"
15 #include "content/public/browser/web_contents.h" 14 #include "content/public/browser/web_contents.h"
16 #include "content/public/browser/web_ui.h" 15 #include "content/public/browser/web_ui.h"
17 #include "content/public/browser/web_ui_message_handler.h" 16 #include "content/public/browser/web_ui_message_handler.h"
18 #include "content/public/common/bindings_policy.h" 17 #include "content/public/common/bindings_policy.h"
18 #include "ui/web_dialogs/web_dialog_delegate.h"
19 19
20 using content::RenderViewHost; 20 using content::RenderViewHost;
21 using content::WebUIMessageHandler; 21 using content::WebUIMessageHandler;
22 22
23 static base::LazyInstance<base::PropertyAccessor<WebDialogDelegate*> > 23 static base::LazyInstance<base::PropertyAccessor<ui::WebDialogDelegate*> >
24 g_web_dialog_ui_property_accessor = LAZY_INSTANCE_INITIALIZER; 24 g_web_dialog_ui_property_accessor = LAZY_INSTANCE_INITIALIZER;
25 25
26 namespace ui {
27
26 WebDialogUI::WebDialogUI(content::WebUI* web_ui) 28 WebDialogUI::WebDialogUI(content::WebUI* web_ui)
27 : WebUIController(web_ui) { 29 : WebUIController(web_ui) {
28 } 30 }
29 31
30 WebDialogUI::~WebDialogUI() { 32 WebDialogUI::~WebDialogUI() {
31 // Don't unregister our property. During the teardown of the WebContents, 33 // Don't unregister our property. During the teardown of the WebContents,
32 // this will be deleted, but the WebContents will already be destroyed. 34 // this will be deleted, but the WebContents will already be destroyed.
33 // 35 //
34 // This object is owned indirectly by the WebContents. WebUIs can change, so 36 // This object is owned indirectly by the WebContents. WebUIs can change, so
35 // it's scary if this WebUI is changed out and replaced with something else, 37 // it's scary if this WebUI is changed out and replaced with something else,
(...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after
122 } 124 }
123 125
124 bool WebDialogDelegate::HandleAddNewContents( 126 bool WebDialogDelegate::HandleAddNewContents(
125 content::WebContents* source, 127 content::WebContents* source,
126 content::WebContents* new_contents, 128 content::WebContents* new_contents,
127 WindowOpenDisposition disposition, 129 WindowOpenDisposition disposition,
128 const gfx::Rect& initial_pos, 130 const gfx::Rect& initial_pos,
129 bool user_gesture) { 131 bool user_gesture) {
130 return false; 132 return false;
131 } 133 }
134
135 } // namespace ui
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698