summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authortfarina@chromium.org <tfarina@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-02-10 00:13:58 +0000
committertfarina@chromium.org <tfarina@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-02-10 00:13:58 +0000
commit7ade2739cb51ef8c3ab5b77c8b2951c8367ca043 (patch)
treeb9c4f78f3d1789e0b89bda7a2f0fec8551ec3880
parent35b2c88049d48a928885680bba43653d5ecab8cc (diff)
downloadchromium_src-7ade2739cb51ef8c3ab5b77c8b2951c8367ca043.zip
chromium_src-7ade2739cb51ef8c3ab5b77c8b2951c8367ca043.tar.gz
chromium_src-7ade2739cb51ef8c3ab5b77c8b2951c8367ca043.tar.bz2
WebUI: Rename the class DOMUI to WebUI.
Add a typedef for WebUI to allow us renaming the class now, and then renaming the other entries in small chunks. Also rename the file from dom_ui.[cc,h] to web_ui.[cc,h]. BUG=59945 TEST=trybots Review URL: http://codereview.chromium.org/6458016 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@74386 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r--chrome/browser/chromeos/dom_ui/imageburner_ui.h2
-rw-r--r--chrome/browser/chromeos/dom_ui/login/login_ui.h4
-rw-r--r--chrome/browser/chromeos/dom_ui/menu_ui.h2
-rw-r--r--chrome/browser/chromeos/dom_ui/mobile_setup_ui.h4
-rw-r--r--chrome/browser/chromeos/dom_ui/register_page_ui.h4
-rw-r--r--chrome/browser/chromeos/dom_ui/system_info_ui.h4
-rw-r--r--chrome/browser/chromeos/login/web_page_view.cc4
-rw-r--r--chrome/browser/dom_ui/app_launcher_handler.h2
-rw-r--r--chrome/browser/dom_ui/bookmarks_ui.h4
-rw-r--r--chrome/browser/dom_ui/conflicts_ui.h4
-rw-r--r--chrome/browser/dom_ui/constrained_html_ui.h4
-rw-r--r--chrome/browser/dom_ui/devtools_ui.h4
-rw-r--r--chrome/browser/dom_ui/dom_ui_browsertest.cc12
-rw-r--r--chrome/browser/dom_ui/dom_ui_handler_browsertest.h2
-rw-r--r--chrome/browser/dom_ui/downloads_dom_handler.h4
-rw-r--r--chrome/browser/dom_ui/downloads_ui.h4
-rw-r--r--chrome/browser/dom_ui/file_browse_browsertest.cc6
-rw-r--r--chrome/browser/dom_ui/flags_ui.h4
-rw-r--r--chrome/browser/dom_ui/foreign_session_handler.h4
-rw-r--r--chrome/browser/dom_ui/generic_handler.h2
-rw-r--r--chrome/browser/dom_ui/gpu_internals_ui.h4
-rw-r--r--chrome/browser/dom_ui/history2_ui.h4
-rw-r--r--chrome/browser/dom_ui/history_ui.h4
-rw-r--r--chrome/browser/dom_ui/html_dialog_ui.h4
-rw-r--r--chrome/browser/dom_ui/keyboard_ui.h4
-rw-r--r--chrome/browser/dom_ui/mediaplayer_ui.h4
-rw-r--r--chrome/browser/dom_ui/most_visited_handler.h4
-rw-r--r--chrome/browser/dom_ui/net_internals_ui.h4
-rw-r--r--chrome/browser/dom_ui/new_tab_page_sync_handler.h4
-rw-r--r--chrome/browser/dom_ui/new_tab_ui.h4
-rw-r--r--chrome/browser/dom_ui/ntp_login_handler.h4
-rw-r--r--chrome/browser/dom_ui/options/options_managed_banner_handler.cc12
-rw-r--r--chrome/browser/dom_ui/options/options_managed_banner_handler.h8
-rw-r--r--chrome/browser/dom_ui/options/options_ui.h2
-rw-r--r--chrome/browser/dom_ui/plugins_ui.h4
-rw-r--r--chrome/browser/dom_ui/print_preview_handler.h2
-rw-r--r--chrome/browser/dom_ui/print_preview_ui.h2
-rw-r--r--chrome/browser/dom_ui/print_preview_ui_html_source_unittest.cc2
-rw-r--r--chrome/browser/dom_ui/remoting_ui.h4
-rw-r--r--chrome/browser/dom_ui/shown_sections_handler.h5
-rw-r--r--chrome/browser/dom_ui/slideshow_ui.h4
-rw-r--r--chrome/browser/dom_ui/sync_internals_ui.h2
-rw-r--r--chrome/browser/dom_ui/textfields_ui.h6
-rw-r--r--chrome/browser/dom_ui/tips_handler.cc23
-rw-r--r--chrome/browser/dom_ui/tips_handler.h9
-rw-r--r--chrome/browser/dom_ui/web_ui.cc (renamed from chrome/browser/dom_ui/dom_ui.cc)51
-rw-r--r--chrome/browser/dom_ui/web_ui.h (renamed from chrome/browser/dom_ui/dom_ui.h)49
-rw-r--r--chrome/browser/dom_ui/web_ui_factory.cc20
-rw-r--r--chrome/browser/dom_ui/web_ui_factory.h16
-rw-r--r--chrome/browser/extensions/extension_web_ui.h2
-rw-r--r--chrome/browser/extensions/extensions_ui.h4
-rw-r--r--chrome/browser/printing/print_dialog_cloud.cc2
-rw-r--r--chrome/browser/printing/print_dialog_cloud_internal.h4
-rw-r--r--chrome/browser/printing/print_preview_message_handler.cc2
-rw-r--r--chrome/browser/remoting/remoting_options_handler.cc12
-rw-r--r--chrome/browser/remoting/remoting_options_handler.h10
-rw-r--r--chrome/browser/remoting/setup_flow.cc22
-rw-r--r--chrome/browser/remoting/setup_flow.h7
-rw-r--r--chrome/browser/remoting/setup_flow_get_status_step.cc2
-rw-r--r--chrome/browser/remoting/setup_flow_login_step.cc6
-rw-r--r--chrome/browser/remoting/setup_flow_register_step.cc4
-rw-r--r--chrome/browser/remoting/setup_flow_start_host_step.cc2
-rw-r--r--chrome/browser/tab_contents/render_view_host_manager.cc38
-rw-r--r--chrome/browser/tab_contents/render_view_host_manager.h28
-rw-r--r--chrome/browser/tab_contents/render_view_host_manager_unittest.cc6
-rw-r--r--chrome/browser/tab_contents/tab_contents.cc80
-rw-r--r--chrome/browser/tab_contents/tab_contents.h16
-rw-r--r--chrome/browser/ui/cocoa/html_dialog_window_controller_unittest.mm4
-rw-r--r--chrome/browser/ui/views/textfield_views.cc14
-rw-r--r--chrome/browser/ui/views/textfield_views.h2
-rw-r--r--chrome/chrome_browser.gypi4
71 files changed, 313 insertions, 303 deletions
diff --git a/chrome/browser/chromeos/dom_ui/imageburner_ui.h b/chrome/browser/chromeos/dom_ui/imageburner_ui.h
index f6f9ac6..ade75a5 100644
--- a/chrome/browser/chromeos/dom_ui/imageburner_ui.h
+++ b/chrome/browser/chromeos/dom_ui/imageburner_ui.h
@@ -18,7 +18,7 @@
#include "chrome/browser/chromeos/cros/cros_library.h"
#include "chrome/browser/chromeos/cros/mount_library.h"
#include "chrome/browser/dom_ui/chrome_url_data_manager.h"
-#include "chrome/browser/dom_ui/dom_ui.h"
+#include "chrome/browser/dom_ui/web_ui.h"
#include "chrome/browser/download/download_item.h"
#include "chrome/browser/download/download_manager.h"
#include "chrome/browser/download/download_util.h"
diff --git a/chrome/browser/chromeos/dom_ui/login/login_ui.h b/chrome/browser/chromeos/dom_ui/login/login_ui.h
index 4b769f2..eb4af03 100644
--- a/chrome/browser/chromeos/dom_ui/login/login_ui.h
+++ b/chrome/browser/chromeos/dom_ui/login/login_ui.h
@@ -1,4 +1,4 @@
-// Copyright (c) 2010 The Chromium Authors. All rights reserved.
+// 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.
@@ -11,7 +11,7 @@
#include "base/scoped_ptr.h"
#include "chrome/browser/chromeos/login/login_status_consumer.h"
#include "chrome/browser/dom_ui/chrome_url_data_manager.h"
-#include "chrome/browser/dom_ui/dom_ui.h"
+#include "chrome/browser/dom_ui/web_ui.h"
class Profile;
diff --git a/chrome/browser/chromeos/dom_ui/menu_ui.h b/chrome/browser/chromeos/dom_ui/menu_ui.h
index 933a0a6..21ef326 100644
--- a/chrome/browser/chromeos/dom_ui/menu_ui.h
+++ b/chrome/browser/chromeos/dom_ui/menu_ui.h
@@ -9,7 +9,7 @@
#include <string>
#include "chrome/browser/dom_ui/chrome_url_data_manager.h"
-#include "chrome/browser/dom_ui/dom_ui.h"
+#include "chrome/browser/dom_ui/web_ui.h"
class DictionaryValue;
diff --git a/chrome/browser/chromeos/dom_ui/mobile_setup_ui.h b/chrome/browser/chromeos/dom_ui/mobile_setup_ui.h
index f30af42..76aacf3 100644
--- a/chrome/browser/chromeos/dom_ui/mobile_setup_ui.h
+++ b/chrome/browser/chromeos/dom_ui/mobile_setup_ui.h
@@ -1,4 +1,4 @@
-// Copyright (c) 2010 The Chromium Authors. All rights reserved.
+// 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.
@@ -6,7 +6,7 @@
#define CHROME_BROWSER_CHROMEOS_DOM_UI_MOBILE_SETUP_UI_H_
#pragma once
-#include "chrome/browser/dom_ui/dom_ui.h"
+#include "chrome/browser/dom_ui/web_ui.h"
// A custom DOMUI that defines datasource for mobile setup registration page
// that is used in Chrome OS activate modem and perform plan subscription tasks.
diff --git a/chrome/browser/chromeos/dom_ui/register_page_ui.h b/chrome/browser/chromeos/dom_ui/register_page_ui.h
index 44138eb..1bf30d2 100644
--- a/chrome/browser/chromeos/dom_ui/register_page_ui.h
+++ b/chrome/browser/chromeos/dom_ui/register_page_ui.h
@@ -1,4 +1,4 @@
-// Copyright (c) 2010 The Chromium Authors. All rights reserved.
+// 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.
@@ -6,7 +6,7 @@
#define CHROME_BROWSER_CHROMEOS_DOM_UI_REGISTER_PAGE_UI_H_
#pragma once
-#include "chrome/browser/dom_ui/dom_ui.h"
+#include "chrome/browser/dom_ui/web_ui.h"
// A custom DOMUI that defines datasource for host registration page that
// is used in Chrome OS to register product on first sign in.
diff --git a/chrome/browser/chromeos/dom_ui/system_info_ui.h b/chrome/browser/chromeos/dom_ui/system_info_ui.h
index 945ca24..da48fca 100644
--- a/chrome/browser/chromeos/dom_ui/system_info_ui.h
+++ b/chrome/browser/chromeos/dom_ui/system_info_ui.h
@@ -1,4 +1,4 @@
-// Copyright (c) 2010 The Chromium Authors. All rights reserved.
+// 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.
@@ -6,7 +6,7 @@
#define CHROME_BROWSER_CHROMEOS_DOM_UI_SYSTEM_INFO_UI_H_
#pragma once
-#include "chrome/browser/dom_ui/dom_ui.h"
+#include "chrome/browser/dom_ui/web_ui.h"
class SystemInfoUI : public DOMUI {
public:
diff --git a/chrome/browser/chromeos/login/web_page_view.cc b/chrome/browser/chromeos/login/web_page_view.cc
index 4bd0c0e..c9dd751 100644
--- a/chrome/browser/chromeos/login/web_page_view.cc
+++ b/chrome/browser/chromeos/login/web_page_view.cc
@@ -1,4 +1,4 @@
-// Copyright (c) 2009 The Chromium Authors. All rights reserved.
+// 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.
@@ -12,7 +12,7 @@
#include "chrome/browser/child_process_security_policy.h"
#include "chrome/browser/chromeos/login/helper.h"
#include "chrome/browser/chromeos/login/rounded_rect_painter.h"
-#include "chrome/browser/dom_ui/dom_ui.h"
+#include "chrome/browser/dom_ui/web_ui.h"
#include "chrome/browser/tab_contents/tab_contents.h"
#include "chrome/common/bindings_policy.h"
#include "grit/generated_resources.h"
diff --git a/chrome/browser/dom_ui/app_launcher_handler.h b/chrome/browser/dom_ui/app_launcher_handler.h
index 22912a3..3158fd9 100644
--- a/chrome/browser/dom_ui/app_launcher_handler.h
+++ b/chrome/browser/dom_ui/app_launcher_handler.h
@@ -7,7 +7,7 @@
#pragma once
#include "base/scoped_ptr.h"
-#include "chrome/browser/dom_ui/dom_ui.h"
+#include "chrome/browser/dom_ui/web_ui.h"
#include "chrome/browser/extensions/extension_install_ui.h"
#include "chrome/browser/prefs/pref_change_registrar.h"
#include "chrome/common/notification_observer.h"
diff --git a/chrome/browser/dom_ui/bookmarks_ui.h b/chrome/browser/dom_ui/bookmarks_ui.h
index 8e8e61b..736b118 100644
--- a/chrome/browser/dom_ui/bookmarks_ui.h
+++ b/chrome/browser/dom_ui/bookmarks_ui.h
@@ -1,4 +1,4 @@
-// Copyright (c) 2010 The Chromium Authors. All rights reserved.
+// 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.
@@ -9,7 +9,7 @@
#include <string>
#include "chrome/browser/dom_ui/chrome_url_data_manager.h"
-#include "chrome/browser/dom_ui/dom_ui.h"
+#include "chrome/browser/dom_ui/web_ui.h"
class GURL;
class RefCountedMemory;
diff --git a/chrome/browser/dom_ui/conflicts_ui.h b/chrome/browser/dom_ui/conflicts_ui.h
index 5b4dbcd..cb885c3 100644
--- a/chrome/browser/dom_ui/conflicts_ui.h
+++ b/chrome/browser/dom_ui/conflicts_ui.h
@@ -1,4 +1,4 @@
-// Copyright (c) 2010 The Chromium Authors. All rights reserved.
+// 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.
@@ -6,7 +6,7 @@
#define CHROME_BROWSER_DOM_UI_CONFLICTS_UI_H_
#pragma once
-#include "chrome/browser/dom_ui/dom_ui.h"
+#include "chrome/browser/dom_ui/web_ui.h"
#if defined(OS_WIN)
diff --git a/chrome/browser/dom_ui/constrained_html_ui.h b/chrome/browser/dom_ui/constrained_html_ui.h
index b9dc0ee..1824039 100644
--- a/chrome/browser/dom_ui/constrained_html_ui.h
+++ b/chrome/browser/dom_ui/constrained_html_ui.h
@@ -1,4 +1,4 @@
-// Copyright (c) 2010 The Chromium Authors. All rights reserved.
+// 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.
@@ -8,7 +8,7 @@
#include <vector>
-#include "chrome/browser/dom_ui/dom_ui.h"
+#include "chrome/browser/dom_ui/web_ui.h"
#include "chrome/browser/tab_contents/constrained_window.h"
#include "chrome/common/property_bag.h"
diff --git a/chrome/browser/dom_ui/devtools_ui.h b/chrome/browser/dom_ui/devtools_ui.h
index f41c871..8793074 100644
--- a/chrome/browser/dom_ui/devtools_ui.h
+++ b/chrome/browser/dom_ui/devtools_ui.h
@@ -1,4 +1,4 @@
-// Copyright (c) 2009 The Chromium Authors. All rights reserved.
+// 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.
@@ -6,7 +6,7 @@
#define CHROME_BROWSER_DOM_UI_DEVTOOLS_UI_H_
#pragma once
-#include "chrome/browser/dom_ui/dom_ui.h"
+#include "chrome/browser/dom_ui/web_ui.h"
class DevToolsUI : public DOMUI {
public:
diff --git a/chrome/browser/dom_ui/dom_ui_browsertest.cc b/chrome/browser/dom_ui/dom_ui_browsertest.cc
index d390139..28ed0a0 100644
--- a/chrome/browser/dom_ui/dom_ui_browsertest.cc
+++ b/chrome/browser/dom_ui/dom_ui_browsertest.cc
@@ -52,14 +52,14 @@ void DOMUITest::BuildJavaScriptTest(const FilePath& src_path,
}
void DOMUITest::SetupHandlers() {
- DOMUI* dom_ui_instance =
- browser()->GetSelectedTabContents()->dom_ui();
- ASSERT_TRUE(dom_ui_instance != NULL);
- dom_ui_instance->register_callback_overwrites(true);
- test_handler_->Attach(dom_ui_instance);
+ WebUI* web_ui_instance =
+ browser()->GetSelectedTabContents()->web_ui();
+ ASSERT_TRUE(web_ui_instance != NULL);
+ web_ui_instance->register_callback_overwrites(true);
+ test_handler_->Attach(web_ui_instance);
if (GetMockMessageHandler())
- GetMockMessageHandler()->Attach(dom_ui_instance);
+ GetMockMessageHandler()->Attach(web_ui_instance);
}
IN_PROC_BROWSER_TEST_F(DOMUITest, TestSamplePass) {
diff --git a/chrome/browser/dom_ui/dom_ui_handler_browsertest.h b/chrome/browser/dom_ui/dom_ui_handler_browsertest.h
index d542ace..bc551af 100644
--- a/chrome/browser/dom_ui/dom_ui_handler_browsertest.h
+++ b/chrome/browser/dom_ui/dom_ui_handler_browsertest.h
@@ -8,7 +8,7 @@
#include <string>
-#include "chrome/browser/dom_ui/dom_ui.h"
+#include "chrome/browser/dom_ui/web_ui.h"
// This class registers test framework specific handlers on DOMUI objects.
class DOMUITestHandler : public WebUIMessageHandler {
diff --git a/chrome/browser/dom_ui/downloads_dom_handler.h b/chrome/browser/dom_ui/downloads_dom_handler.h
index cf7775b..2e5b3fc 100644
--- a/chrome/browser/dom_ui/downloads_dom_handler.h
+++ b/chrome/browser/dom_ui/downloads_dom_handler.h
@@ -1,4 +1,4 @@
-// Copyright (c) 2010 The Chromium Authors. All rights reserved.
+// 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.
@@ -9,7 +9,7 @@
#include <vector>
#include "base/scoped_callback_factory.h"
-#include "chrome/browser/dom_ui/dom_ui.h"
+#include "chrome/browser/dom_ui/web_ui.h"
#include "chrome/browser/download/download_item.h"
#include "chrome/browser/download/download_manager.h"
diff --git a/chrome/browser/dom_ui/downloads_ui.h b/chrome/browser/dom_ui/downloads_ui.h
index c6f5727..84103eb 100644
--- a/chrome/browser/dom_ui/downloads_ui.h
+++ b/chrome/browser/dom_ui/downloads_ui.h
@@ -1,4 +1,4 @@
-// Copyright (c) 2006-2008 The Chromium Authors. All rights reserved.
+// 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.
@@ -6,7 +6,7 @@
#define CHROME_BROWSER_DOM_UI_DOWNLOADS_UI_H_
#pragma once
-#include "chrome/browser/dom_ui/dom_ui.h"
+#include "chrome/browser/dom_ui/web_ui.h"
class RefCountedMemory;
diff --git a/chrome/browser/dom_ui/file_browse_browsertest.cc b/chrome/browser/dom_ui/file_browse_browsertest.cc
index 3df289d..6264be6 100644
--- a/chrome/browser/dom_ui/file_browse_browsertest.cc
+++ b/chrome/browser/dom_ui/file_browse_browsertest.cc
@@ -4,7 +4,7 @@
#include "base/task.h"
#include "base/path_service.h"
-#include "chrome/browser/dom_ui/dom_ui.h"
+#include "chrome/browser/dom_ui/web_ui.h"
#include "chrome/browser/tab_contents/navigation_controller.h"
#include "chrome/browser/tab_contents/tab_contents.h"
#include "chrome/browser/ui/views/html_dialog_view.h"
@@ -89,8 +89,8 @@ class FileBrowseUiObserver : public NotificationObserver {
return file_browse_tab_;
}
- DOMUI* file_browse_ui() {
- return file_browse_tab_ ? file_browse_tab_->render_manager()->dom_ui() :
+ WebUI* file_browse_ui() {
+ return file_browse_tab_ ? file_browse_tab_->render_manager()->web_ui() :
NULL;
}
diff --git a/chrome/browser/dom_ui/flags_ui.h b/chrome/browser/dom_ui/flags_ui.h
index 7f14604..4a2b7bf 100644
--- a/chrome/browser/dom_ui/flags_ui.h
+++ b/chrome/browser/dom_ui/flags_ui.h
@@ -1,4 +1,4 @@
-// Copyright (c) 2010 The Chromium Authors. All rights reserved.
+// 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.
@@ -6,7 +6,7 @@
#define CHROME_BROWSER_DOM_UI_FLAGS_UI_H_
#pragma once
-#include "chrome/browser/dom_ui/dom_ui.h"
+#include "chrome/browser/dom_ui/web_ui.h"
class PrefService;
class RefCountedMemory;
diff --git a/chrome/browser/dom_ui/foreign_session_handler.h b/chrome/browser/dom_ui/foreign_session_handler.h
index dfb49a4..c1cb9f4 100644
--- a/chrome/browser/dom_ui/foreign_session_handler.h
+++ b/chrome/browser/dom_ui/foreign_session_handler.h
@@ -1,4 +1,4 @@
-// Copyright (c) 2010 The Chromium Authors. All rights reserved.
+// 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.
@@ -8,7 +8,7 @@
#include <vector>
-#include "chrome/browser/dom_ui/dom_ui.h"
+#include "chrome/browser/dom_ui/web_ui.h"
#include "chrome/browser/sessions/session_service.h"
#include "chrome/browser/sync/glue/session_model_associator.h"
#include "chrome/common/notification_observer.h"
diff --git a/chrome/browser/dom_ui/generic_handler.h b/chrome/browser/dom_ui/generic_handler.h
index 975ecbb..59dbfc1 100644
--- a/chrome/browser/dom_ui/generic_handler.h
+++ b/chrome/browser/dom_ui/generic_handler.h
@@ -6,7 +6,7 @@
#define CHROME_BROWSER_DOM_UI_GENERIC_HANDLER_H_
#pragma once
-#include "chrome/browser/dom_ui/dom_ui.h"
+#include "chrome/browser/dom_ui/web_ui.h"
class ListValue;
diff --git a/chrome/browser/dom_ui/gpu_internals_ui.h b/chrome/browser/dom_ui/gpu_internals_ui.h
index 8b45692..024e946 100644
--- a/chrome/browser/dom_ui/gpu_internals_ui.h
+++ b/chrome/browser/dom_ui/gpu_internals_ui.h
@@ -1,4 +1,4 @@
-// Copyright (c) 2010 The Chromium Authors. All rights reserved.
+// 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.
@@ -6,7 +6,7 @@
#define CHROME_BROWSER_DOM_UI_GPU_INTERNALS_UI_H_
#pragma once
-#include "chrome/browser/dom_ui/dom_ui.h"
+#include "chrome/browser/dom_ui/web_ui.h"
class GpuInternalsUI : public DOMUI {
public:
diff --git a/chrome/browser/dom_ui/history2_ui.h b/chrome/browser/dom_ui/history2_ui.h
index 95c713b..ec300110 100644
--- a/chrome/browser/dom_ui/history2_ui.h
+++ b/chrome/browser/dom_ui/history2_ui.h
@@ -1,4 +1,4 @@
-// Copyright (c) 2010 The Chromium Authors. All rights reserved.
+// 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.
@@ -10,7 +10,7 @@
#include "base/string16.h"
#include "chrome/browser/dom_ui/chrome_url_data_manager.h"
-#include "chrome/browser/dom_ui/dom_ui.h"
+#include "chrome/browser/dom_ui/web_ui.h"
#include "chrome/browser/cancelable_request.h"
#include "chrome/browser/history/history.h"
#include "chrome/common/notification_registrar.h"
diff --git a/chrome/browser/dom_ui/history_ui.h b/chrome/browser/dom_ui/history_ui.h
index cda33f2..f9da6a3 100644
--- a/chrome/browser/dom_ui/history_ui.h
+++ b/chrome/browser/dom_ui/history_ui.h
@@ -1,4 +1,4 @@
-// Copyright (c) 2010 The Chromium Authors. All rights reserved.
+// 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.
@@ -10,7 +10,7 @@
#include "base/string16.h"
#include "chrome/browser/dom_ui/chrome_url_data_manager.h"
-#include "chrome/browser/dom_ui/dom_ui.h"
+#include "chrome/browser/dom_ui/web_ui.h"
#include "chrome/browser/cancelable_request.h"
#include "chrome/browser/history/history.h"
#include "chrome/common/notification_registrar.h"
diff --git a/chrome/browser/dom_ui/html_dialog_ui.h b/chrome/browser/dom_ui/html_dialog_ui.h
index b27d356..1d31e2f 100644
--- a/chrome/browser/dom_ui/html_dialog_ui.h
+++ b/chrome/browser/dom_ui/html_dialog_ui.h
@@ -1,4 +1,4 @@
-// Copyright (c) 2006-2008 The Chromium Authors. All rights reserved.
+// 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.
@@ -9,7 +9,7 @@
#include <string>
#include <vector>
-#include "chrome/browser/dom_ui/dom_ui.h"
+#include "chrome/browser/dom_ui/web_ui.h"
#include "chrome/common/property_bag.h"
#include "googleurl/src/gurl.h"
diff --git a/chrome/browser/dom_ui/keyboard_ui.h b/chrome/browser/dom_ui/keyboard_ui.h
index abb23d3..6a967d0 100644
--- a/chrome/browser/dom_ui/keyboard_ui.h
+++ b/chrome/browser/dom_ui/keyboard_ui.h
@@ -1,4 +1,4 @@
-// Copyright (c) 2010 The Chromium Authors. All rights reserved.
+// 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.
@@ -8,8 +8,8 @@
#include <string>
-#include "chrome/browser/dom_ui/dom_ui.h"
#include "chrome/browser/dom_ui/chrome_url_data_manager.h"
+#include "chrome/browser/dom_ui/web_ui.h"
class Profile;
diff --git a/chrome/browser/dom_ui/mediaplayer_ui.h b/chrome/browser/dom_ui/mediaplayer_ui.h
index 921190a..0d27a89 100644
--- a/chrome/browser/dom_ui/mediaplayer_ui.h
+++ b/chrome/browser/dom_ui/mediaplayer_ui.h
@@ -1,4 +1,4 @@
-// Copyright (c) 2010 The Chromium Authors. All rights reserved.
+// 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.
@@ -10,7 +10,7 @@
#include <vector>
#include "chrome/browser/dom_ui/chrome_url_data_manager.h"
-#include "chrome/browser/dom_ui/dom_ui.h"
+#include "chrome/browser/dom_ui/web_ui.h"
#include "chrome/common/notification_observer.h"
#include "chrome/common/notification_source.h"
#include "chrome/common/notification_type.h"
diff --git a/chrome/browser/dom_ui/most_visited_handler.h b/chrome/browser/dom_ui/most_visited_handler.h
index a16fc87..6ee82b3 100644
--- a/chrome/browser/dom_ui/most_visited_handler.h
+++ b/chrome/browser/dom_ui/most_visited_handler.h
@@ -1,4 +1,4 @@
-// Copyright (c) 2010 The Chromium Authors. All rights reserved.
+// 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.
@@ -10,7 +10,7 @@
#include <vector>
#include "chrome/browser/cancelable_request.h"
-#include "chrome/browser/dom_ui/dom_ui.h"
+#include "chrome/browser/dom_ui/web_ui.h"
#include "chrome/browser/history/history_types.h"
#include "chrome/common/notification_observer.h"
#include "chrome/common/notification_registrar.h"
diff --git a/chrome/browser/dom_ui/net_internals_ui.h b/chrome/browser/dom_ui/net_internals_ui.h
index 3c67963..18593c5 100644
--- a/chrome/browser/dom_ui/net_internals_ui.h
+++ b/chrome/browser/dom_ui/net_internals_ui.h
@@ -1,4 +1,4 @@
-// Copyright (c) 2010 The Chromium Authors. All rights reserved.
+// 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.
@@ -6,7 +6,7 @@
#define CHROME_BROWSER_DOM_UI_NET_INTERNALS_UI_H_
#pragma once
-#include "chrome/browser/dom_ui/dom_ui.h"
+#include "chrome/browser/dom_ui/web_ui.h"
class NetInternalsUI : public DOMUI {
public:
diff --git a/chrome/browser/dom_ui/new_tab_page_sync_handler.h b/chrome/browser/dom_ui/new_tab_page_sync_handler.h
index 97191b6..8a1bc48 100644
--- a/chrome/browser/dom_ui/new_tab_page_sync_handler.h
+++ b/chrome/browser/dom_ui/new_tab_page_sync_handler.h
@@ -1,4 +1,4 @@
-// Copyright (c) 2006-2008 The Chromium Authors. All rights reserved.
+// 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.
@@ -8,7 +8,7 @@
#include <string>
-#include "chrome/browser/dom_ui/dom_ui.h"
+#include "chrome/browser/dom_ui/web_ui.h"
#include "chrome/browser/sync/profile_sync_service.h"
#include "chrome/browser/sync/sync_ui_util.h"
diff --git a/chrome/browser/dom_ui/new_tab_ui.h b/chrome/browser/dom_ui/new_tab_ui.h
index 95f86f4..aeed9c3 100644
--- a/chrome/browser/dom_ui/new_tab_ui.h
+++ b/chrome/browser/dom_ui/new_tab_ui.h
@@ -1,4 +1,4 @@
-// Copyright (c) 2010 The Chromium Authors. All rights reserved.
+// 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.
@@ -10,8 +10,8 @@
#include "base/gtest_prod_util.h"
#include "base/timer.h"
-#include "chrome/browser/dom_ui/dom_ui.h"
#include "chrome/browser/dom_ui/chrome_url_data_manager.h"
+#include "chrome/browser/dom_ui/web_ui.h"
#include "chrome/browser/sessions/tab_restore_service.h"
#include "chrome/common/notification_observer.h"
#include "chrome/common/notification_registrar.h"
diff --git a/chrome/browser/dom_ui/ntp_login_handler.h b/chrome/browser/dom_ui/ntp_login_handler.h
index 628cc7e..2b766ac 100644
--- a/chrome/browser/dom_ui/ntp_login_handler.h
+++ b/chrome/browser/dom_ui/ntp_login_handler.h
@@ -1,4 +1,4 @@
-// Copyright (c) 2010 The Chromium Authors. All rights reserved.
+// 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.
@@ -6,7 +6,7 @@
#define CHROME_BROWSER_DOM_UI_NTP_LOGIN_HANDLER_H_
#pragma once
-#include "chrome/browser/dom_ui/dom_ui.h"
+#include "chrome/browser/dom_ui/web_ui.h"
#include "chrome/browser/prefs/pref_member.h"
#include "chrome/common/notification_observer.h"
diff --git a/chrome/browser/dom_ui/options/options_managed_banner_handler.cc b/chrome/browser/dom_ui/options/options_managed_banner_handler.cc
index 5f01e4f..e28a731 100644
--- a/chrome/browser/dom_ui/options/options_managed_banner_handler.cc
+++ b/chrome/browser/dom_ui/options/options_managed_banner_handler.cc
@@ -1,4 +1,4 @@
-// Copyright (c) 2010 The Chromium Authors. All rights reserved.
+// 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.
@@ -6,13 +6,13 @@
#include "base/utf_string_conversions.h"
#include "base/values.h"
-#include "chrome/browser/dom_ui/dom_ui.h"
+#include "chrome/browser/dom_ui/web_ui.h"
#include "chrome/browser/profiles/profile.h"
OptionsManagedBannerHandler::OptionsManagedBannerHandler(
- DOMUI* dom_ui, const string16& page_name, OptionsPage page)
- : policy::ManagedPrefsBannerBase(dom_ui->GetProfile()->GetPrefs(), page),
- dom_ui_(dom_ui), page_name_(page_name), page_(page) {
+ WebUI* web_ui, const string16& page_name, OptionsPage page)
+ : policy::ManagedPrefsBannerBase(web_ui->GetProfile()->GetPrefs(), page),
+ web_ui_(web_ui), page_name_(page_name), page_(page) {
// Initialize the visibility state of the banner.
SetupBannerVisibilty();
}
@@ -34,5 +34,5 @@ void OptionsManagedBannerHandler::SetupBannerVisibilty() {
FundamentalValue visibility(DetermineVisibility());
// Set the managed state in the javascript handler.
- dom_ui_->CallJavascriptFunction(UTF16ToWideHack(script), visibility);
+ web_ui_->CallJavascriptFunction(UTF16ToWideHack(script), visibility);
}
diff --git a/chrome/browser/dom_ui/options/options_managed_banner_handler.h b/chrome/browser/dom_ui/options/options_managed_banner_handler.h
index 9cfc5e9..49047df 100644
--- a/chrome/browser/dom_ui/options/options_managed_banner_handler.h
+++ b/chrome/browser/dom_ui/options/options_managed_banner_handler.h
@@ -1,4 +1,4 @@
-// Copyright (c) 2010 The Chromium Authors. All rights reserved.
+// 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.
@@ -10,14 +10,14 @@
#include "chrome/browser/policy/managed_prefs_banner_base.h"
#include "chrome/browser/ui/options/options_window.h"
-class DOMUI;
+class WebUI;
// Managed options banner handler.
// Controls the display of a banner if an options panel contains options
// that are under administator control.
class OptionsManagedBannerHandler : public policy::ManagedPrefsBannerBase {
public:
- OptionsManagedBannerHandler(DOMUI* dom_ui, const string16& page_name,
+ OptionsManagedBannerHandler(WebUI* web_ui, const string16& page_name,
OptionsPage page);
virtual ~OptionsManagedBannerHandler();
@@ -29,7 +29,7 @@ class OptionsManagedBannerHandler : public policy::ManagedPrefsBannerBase {
// Set the managed options banner to be visible or invisible.
void SetupBannerVisibilty();
- DOMUI* dom_ui_; // weak reference to the dom-ui.
+ WebUI* web_ui_; // weak reference to the WebUI.
string16 page_name_; // current options page name.
OptionsPage page_; // current options page value.
diff --git a/chrome/browser/dom_ui/options/options_ui.h b/chrome/browser/dom_ui/options/options_ui.h
index c15a3f7..f3a018b 100644
--- a/chrome/browser/dom_ui/options/options_ui.h
+++ b/chrome/browser/dom_ui/options/options_ui.h
@@ -10,7 +10,7 @@
#include "base/scoped_ptr.h"
#include "chrome/browser/dom_ui/chrome_url_data_manager.h"
-#include "chrome/browser/dom_ui/dom_ui.h"
+#include "chrome/browser/dom_ui/web_ui.h"
#include "chrome/common/notification_observer.h"
#include "chrome/common/notification_registrar.h"
#include "chrome/common/notification_type.h"
diff --git a/chrome/browser/dom_ui/plugins_ui.h b/chrome/browser/dom_ui/plugins_ui.h
index d2813a8..d2250fb 100644
--- a/chrome/browser/dom_ui/plugins_ui.h
+++ b/chrome/browser/dom_ui/plugins_ui.h
@@ -1,4 +1,4 @@
-// Copyright (c) 2010 The Chromium Authors. All rights reserved.
+// 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.
@@ -6,7 +6,7 @@
#define CHROME_BROWSER_DOM_UI_PLUGINS_UI_H_
#pragma once
-#include "chrome/browser/dom_ui/dom_ui.h"
+#include "chrome/browser/dom_ui/web_ui.h"
class PrefService;
class RefCountedMemory;
diff --git a/chrome/browser/dom_ui/print_preview_handler.h b/chrome/browser/dom_ui/print_preview_handler.h
index 7984c1e..4149146 100644
--- a/chrome/browser/dom_ui/print_preview_handler.h
+++ b/chrome/browser/dom_ui/print_preview_handler.h
@@ -8,7 +8,7 @@
#include "base/ref_counted.h"
#include "base/weak_ptr.h"
-#include "chrome/browser/dom_ui/dom_ui.h"
+#include "chrome/browser/dom_ui/web_ui.h"
namespace printing {
class PrintBackend;
diff --git a/chrome/browser/dom_ui/print_preview_ui.h b/chrome/browser/dom_ui/print_preview_ui.h
index 7a3a222..0ef3a9f 100644
--- a/chrome/browser/dom_ui/print_preview_ui.h
+++ b/chrome/browser/dom_ui/print_preview_ui.h
@@ -7,7 +7,7 @@
#pragma once
#include "base/ref_counted.h"
-#include "chrome/browser/dom_ui/dom_ui.h"
+#include "chrome/browser/dom_ui/web_ui.h"
class PrintPreviewUIHTMLSource;
diff --git a/chrome/browser/dom_ui/print_preview_ui_html_source_unittest.cc b/chrome/browser/dom_ui/print_preview_ui_html_source_unittest.cc
index 4c7abd2..0dc4646 100644
--- a/chrome/browser/dom_ui/print_preview_ui_html_source_unittest.cc
+++ b/chrome/browser/dom_ui/print_preview_ui_html_source_unittest.cc
@@ -38,7 +38,7 @@ TEST_F(PrintPreviewUIHTMLSourceTest, PrintPreviewData) {
EXPECT_EQ(2, browser()->tab_count());
PrintPreviewUI* preview_ui =
- reinterpret_cast<PrintPreviewUI*>(preview_tab->dom_ui());
+ reinterpret_cast<PrintPreviewUI*>(preview_tab->web_ui());
ASSERT_TRUE(preview_ui != NULL);
PrintPreviewUIHTMLSource* html_source = preview_ui->html_source();
diff --git a/chrome/browser/dom_ui/remoting_ui.h b/chrome/browser/dom_ui/remoting_ui.h
index 8012a82..b4fd3c2 100644
--- a/chrome/browser/dom_ui/remoting_ui.h
+++ b/chrome/browser/dom_ui/remoting_ui.h
@@ -1,4 +1,4 @@
-// Copyright (c) 2010 The Chromium Authors. All rights reserved.
+// 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.
@@ -6,7 +6,7 @@
#define CHROME_BROWSER_DOM_UI_REMOTING_UI_H_
#pragma once
-#include "chrome/browser/dom_ui/dom_ui.h"
+#include "chrome/browser/dom_ui/web_ui.h"
class PrefService;
class RefCountedMemory;
diff --git a/chrome/browser/dom_ui/shown_sections_handler.h b/chrome/browser/dom_ui/shown_sections_handler.h
index bb3802d..5fa0776 100644
--- a/chrome/browser/dom_ui/shown_sections_handler.h
+++ b/chrome/browser/dom_ui/shown_sections_handler.h
@@ -1,4 +1,4 @@
-// Copyright (c) 2010 The Chromium Authors. All rights reserved.
+// 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.
@@ -6,11 +6,10 @@
#define CHROME_BROWSER_DOM_UI_SHOWN_SECTIONS_HANDLER_H_
#pragma once
-#include "chrome/browser/dom_ui/dom_ui.h"
+#include "chrome/browser/dom_ui/web_ui.h"
#include "chrome/common/notification_observer.h"
#include "chrome/browser/prefs/pref_change_registrar.h"
-class DOMUI;
class Extension;
class Value;
class PrefService;
diff --git a/chrome/browser/dom_ui/slideshow_ui.h b/chrome/browser/dom_ui/slideshow_ui.h
index 51fbeb0..88544c0 100644
--- a/chrome/browser/dom_ui/slideshow_ui.h
+++ b/chrome/browser/dom_ui/slideshow_ui.h
@@ -1,4 +1,4 @@
-// Copyright (c) 2010 The Chromium Authors. All rights reserved.
+// 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.
@@ -6,7 +6,7 @@
#define CHROME_BROWSER_DOM_UI_SLIDESHOW_UI_H_
#pragma once
-#include "chrome/browser/dom_ui/dom_ui.h"
+#include "chrome/browser/dom_ui/web_ui.h"
class SlideshowUI : public DOMUI {
public:
diff --git a/chrome/browser/dom_ui/sync_internals_ui.h b/chrome/browser/dom_ui/sync_internals_ui.h
index 1bc12a4..389bbe5 100644
--- a/chrome/browser/dom_ui/sync_internals_ui.h
+++ b/chrome/browser/dom_ui/sync_internals_ui.h
@@ -9,7 +9,7 @@
#include <string>
#include "base/basictypes.h"
-#include "chrome/browser/dom_ui/dom_ui.h"
+#include "chrome/browser/dom_ui/web_ui.h"
#include "chrome/browser/sync/js_event_handler.h"
namespace browser_sync {
diff --git a/chrome/browser/dom_ui/textfields_ui.h b/chrome/browser/dom_ui/textfields_ui.h
index e271a8a..9ec2828 100644
--- a/chrome/browser/dom_ui/textfields_ui.h
+++ b/chrome/browser/dom_ui/textfields_ui.h
@@ -1,4 +1,4 @@
-// Copyright (c) 2010 The Chromium Authors. All rights reserved.
+// 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.
@@ -9,7 +9,7 @@
#include <string>
#include "chrome/browser/dom_ui/chrome_url_data_manager.h"
-#include "chrome/browser/dom_ui/dom_ui.h"
+#include "chrome/browser/dom_ui/web_ui.h"
class RefCountedMemory;
@@ -55,7 +55,7 @@ class TextfieldsDOMHandler : public WebUIMessageHandler {
DISALLOW_COPY_AND_ASSIGN(TextfieldsDOMHandler);
};
-class TextfieldsUI : public DOMUI {
+class TextfieldsUI : public WebUI {
public:
explicit TextfieldsUI(TabContents* contents);
diff --git a/chrome/browser/dom_ui/tips_handler.cc b/chrome/browser/dom_ui/tips_handler.cc
index 2026d51..7f7b565 100644
--- a/chrome/browser/dom_ui/tips_handler.cc
+++ b/chrome/browser/dom_ui/tips_handler.cc
@@ -1,14 +1,15 @@
-// Copyright (c) 2010 The Chromium Authors. All rights reserved.
+// 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 "chrome/browser/dom_ui/tips_handler.h"
+
#include <string>
#include "base/callback.h"
#include "base/utf_string_conversions.h"
#include "base/values.h"
#include "chrome/browser/browser_process.h"
-#include "chrome/browser/dom_ui/tips_handler.h"
#include "chrome/browser/profiles/profile.h"
#include "chrome/browser/web_resource/web_resource_service.h"
#include "chrome/common/pref_names.h"
@@ -18,15 +19,15 @@
#include "grit/generated_resources.h"
#include "ui/base/l10n/l10n_util.h"
-WebUIMessageHandler* TipsHandler::Attach(DOMUI* dom_ui) {
- dom_ui_ = dom_ui;
- tips_cache_ = dom_ui_->GetProfile()->GetPrefs()->
+WebUIMessageHandler* TipsHandler::Attach(WebUI* web_ui) {
+ web_ui_ = web_ui;
+ tips_cache_ = web_ui_->GetProfile()->GetPrefs()->
GetMutableDictionary(prefs::kNTPWebResourceCache);
- return WebUIMessageHandler::Attach(dom_ui);
+ return WebUIMessageHandler::Attach(web_ui);
}
void TipsHandler::RegisterMessages() {
- dom_ui_->RegisterMessageCallback("getTips",
+ web_ui_->RegisterMessageCallback("getTips",
NewCallback(this, &TipsHandler::HandleGetTips));
}
@@ -44,13 +45,13 @@ void TipsHandler::HandleGetTips(const ListValue* args) {
// If tips are not correct for our language, do not send. Wait for update.
// We need to check here because the new tab page calls for tips before
// the tip service starts up.
- PrefService* current_prefs = dom_ui_->GetProfile()->GetPrefs();
+ PrefService* current_prefs = web_ui_->GetProfile()->GetPrefs();
if (current_prefs->HasPrefPath(prefs::kNTPTipsResourceServer)) {
std::string server = current_prefs->GetString(
prefs::kNTPTipsResourceServer);
std::string locale = g_browser_process->GetApplicationLocale();
if (!EndsWith(server, locale, false)) {
- dom_ui_->CallJavascriptFunction(L"tips", list_value);
+ web_ui_->CallJavascriptFunction(L"tips", list_value);
return;
}
}
@@ -66,7 +67,7 @@ void TipsHandler::HandleGetTips(const ListValue* args) {
// to set home page before resetting tip index to 0.
current_tip_index = 0;
const PrefService::Preference* pref =
- dom_ui_->GetProfile()->GetPrefs()->FindPreference(
+ web_ui_->GetProfile()->GetPrefs()->FindPreference(
prefs::kHomePageIsNewTabPage);
bool value;
if (pref && !pref->IsManaged() &&
@@ -93,7 +94,7 @@ void TipsHandler::SendTip(const std::string& tip, const std::string& tip_type,
tips_cache_->SetInteger(WebResourceService::kCurrentTipPrefName,
tip_index);
// Send list of web resource items back out to the DOM.
- dom_ui_->CallJavascriptFunction(L"tips", list_value);
+ web_ui_->CallJavascriptFunction(L"tips", list_value);
}
// static
diff --git a/chrome/browser/dom_ui/tips_handler.h b/chrome/browser/dom_ui/tips_handler.h
index 3686d3a..2890054 100644
--- a/chrome/browser/dom_ui/tips_handler.h
+++ b/chrome/browser/dom_ui/tips_handler.h
@@ -1,4 +1,4 @@
-// Copyright (c) 2010 The Chromium Authors. All rights reserved.
+// 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.
@@ -12,10 +12,9 @@
#include <string>
-#include "chrome/browser/dom_ui/dom_ui.h"
+#include "chrome/browser/dom_ui/web_ui.h"
class DictionaryValue;
-class DOMUI;
class ListValue;
class PrefService;
@@ -25,7 +24,7 @@ class TipsHandler : public WebUIMessageHandler {
virtual ~TipsHandler() {}
// WebUIMessageHandler implementation and overrides.
- virtual WebUIMessageHandler* Attach(DOMUI* dom_ui);
+ virtual WebUIMessageHandler* Attach(WebUI* web_ui);
virtual void RegisterMessages();
// Callback which pulls tips data from the preferences.
@@ -45,7 +44,7 @@ class TipsHandler : public WebUIMessageHandler {
int tip_index);
// So we can push data out to the page that has called this handler.
- DOMUI* dom_ui_;
+ WebUI* web_ui_;
// Filled with data from cache in preferences.
DictionaryValue* tips_cache_;
diff --git a/chrome/browser/dom_ui/dom_ui.cc b/chrome/browser/dom_ui/web_ui.cc
index 1b92009..71123cb 100644
--- a/chrome/browser/dom_ui/dom_ui.cc
+++ b/chrome/browser/dom_ui/web_ui.cc
@@ -1,8 +1,8 @@
-// Copyright (c) 2010 The Chromium Authors. All rights reserved.
+// 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 "chrome/browser/dom_ui/dom_ui.h"
+#include "chrome/browser/dom_ui/web_ui.h"
#include "base/i18n/rtl.h"
#include "base/json/json_writer.h"
@@ -38,7 +38,7 @@ std::wstring GetJavascript(const std::wstring& function_name,
} // namespace
-DOMUI::DOMUI(TabContents* contents)
+WebUI::WebUI(TabContents* contents)
: hide_favicon_(false),
force_bookmark_bar_visible_(false),
focus_location_bar_by_default_(false),
@@ -51,15 +51,15 @@ DOMUI::DOMUI(TabContents* contents)
AddMessageHandler(handler->Attach(this));
}
-DOMUI::~DOMUI() {
+WebUI::~WebUI() {
STLDeleteContainerPairSecondPointers(message_callbacks_.begin(),
message_callbacks_.end());
STLDeleteContainerPointers(handlers_.begin(), handlers_.end());
}
-// DOMUI, public: -------------------------------------------------------------
+// WebUI, public: -------------------------------------------------------------
-void DOMUI::ProcessDOMUIMessage(const ViewHostMsg_DomMessage_Params& params) {
+void WebUI::ProcessDOMUIMessage(const ViewHostMsg_DomMessage_Params& params) {
// Look up the callback for this message.
MessageCallbackMap::const_iterator callback =
message_callbacks_.find(params.name);
@@ -70,19 +70,19 @@ void DOMUI::ProcessDOMUIMessage(const ViewHostMsg_DomMessage_Params& params) {
callback->second->Run(&params.arguments);
}
-void DOMUI::CallJavascriptFunction(const std::wstring& function_name) {
+void WebUI::CallJavascriptFunction(const std::wstring& function_name) {
std::wstring javascript = function_name + L"();";
ExecuteJavascript(javascript);
}
-void DOMUI::CallJavascriptFunction(const std::wstring& function_name,
+void WebUI::CallJavascriptFunction(const std::wstring& function_name,
const Value& arg) {
std::vector<const Value*> args;
args.push_back(&arg);
ExecuteJavascript(GetJavascript(function_name, args));
}
-void DOMUI::CallJavascriptFunction(
+void WebUI::CallJavascriptFunction(
const std::wstring& function_name,
const Value& arg1, const Value& arg2) {
std::vector<const Value*> args;
@@ -91,7 +91,7 @@ void DOMUI::CallJavascriptFunction(
ExecuteJavascript(GetJavascript(function_name, args));
}
-void DOMUI::CallJavascriptFunction(
+void WebUI::CallJavascriptFunction(
const std::wstring& function_name,
const Value& arg1, const Value& arg2, const Value& arg3) {
std::vector<const Value*> args;
@@ -101,7 +101,7 @@ void DOMUI::CallJavascriptFunction(
ExecuteJavascript(GetJavascript(function_name, args));
}
-void DOMUI::CallJavascriptFunction(
+void WebUI::CallJavascriptFunction(
const std::wstring& function_name,
const Value& arg1,
const Value& arg2,
@@ -115,17 +115,17 @@ void DOMUI::CallJavascriptFunction(
ExecuteJavascript(GetJavascript(function_name, args));
}
-void DOMUI::CallJavascriptFunction(
+void WebUI::CallJavascriptFunction(
const std::wstring& function_name,
const std::vector<const Value*>& args) {
ExecuteJavascript(GetJavascript(function_name, args));
}
-ui::ThemeProvider* DOMUI::GetThemeProvider() const {
+ui::ThemeProvider* WebUI::GetThemeProvider() const {
return GetProfile()->GetThemeProvider();
}
-void DOMUI::RegisterMessageCallback(const std::string &message,
+void WebUI::RegisterMessageCallback(const std::string &message,
MessageCallback *callback) {
std::pair<MessageCallbackMap::iterator, bool> result =
message_callbacks_.insert(std::make_pair(message, callback));
@@ -135,31 +135,36 @@ void DOMUI::RegisterMessageCallback(const std::string &message,
result.first->second = callback;
}
-Profile* DOMUI::GetProfile() const {
+Profile* WebUI::GetProfile() const {
DCHECK(tab_contents());
return tab_contents()->profile();
}
-RenderViewHost* DOMUI::GetRenderViewHost() const {
+RenderViewHost* WebUI::GetRenderViewHost() const {
DCHECK(tab_contents());
return tab_contents()->render_view_host();
}
-// DOMUI, protected: ----------------------------------------------------------
+// WebUI, protected: ----------------------------------------------------------
-void DOMUI::AddMessageHandler(WebUIMessageHandler* handler) {
+void WebUI::AddMessageHandler(WebUIMessageHandler* handler) {
handlers_.push_back(handler);
}
-void DOMUI::ExecuteJavascript(const std::wstring& javascript) {
+void WebUI::ExecuteJavascript(const std::wstring& javascript) {
GetRenderViewHost()->ExecuteJavascriptInWebFrame(string16(),
WideToUTF16Hack(javascript));
}
///////////////////////////////////////////////////////////////////////////////
// WebUIMessageHandler
+WebUIMessageHandler::WebUIMessageHandler() : dom_ui_(NULL) {
+}
+
+WebUIMessageHandler::~WebUIMessageHandler() {
+}
-WebUIMessageHandler* WebUIMessageHandler::Attach(DOMUI* dom_ui) {
+WebUIMessageHandler* WebUIMessageHandler::Attach(WebUI* dom_ui) {
dom_ui_ = dom_ui;
RegisterMessages();
return this;
@@ -168,8 +173,8 @@ WebUIMessageHandler* WebUIMessageHandler::Attach(DOMUI* dom_ui) {
// WebUIMessageHandler, protected: ---------------------------------------------
void WebUIMessageHandler::SetURLAndTitle(DictionaryValue* dictionary,
- string16 title,
- const GURL& gurl) {
+ string16 title,
+ const GURL& gurl) {
dictionary->SetString("url", gurl.spec());
bool using_url_as_the_title = false;
@@ -194,7 +199,7 @@ void WebUIMessageHandler::SetURLAndTitle(DictionaryValue* dictionary,
}
bool WebUIMessageHandler::ExtractIntegerValue(const ListValue* value,
- int* out_int) {
+ int* out_int) {
std::string string_value;
if (value->GetString(0, &string_value))
return base::StringToInt(string_value, out_int);
diff --git a/chrome/browser/dom_ui/dom_ui.h b/chrome/browser/dom_ui/web_ui.h
index d521db2..e78062b 100644
--- a/chrome/browser/dom_ui/dom_ui.h
+++ b/chrome/browser/dom_ui/web_ui.h
@@ -1,9 +1,9 @@
-// Copyright (c) 2010 The Chromium Authors. All rights reserved.
+// 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.
-#ifndef CHROME_BROWSER_DOM_UI_DOM_UI_H_
-#define CHROME_BROWSER_DOM_UI_DOM_UI_H_
+#ifndef CHROME_BROWSER_DOM_UI_WEB_UI_H_
+#define CHROME_BROWSER_DOM_UI_WEB_UI_H_
#pragma once
#include <map>
@@ -28,12 +28,12 @@ namespace ui {
class ThemeProvider;
}
-// A DOMUI sets up the datasources and message handlers for a given HTML-based
+// A WebUI sets up the datasources and message handlers for a given HTML-based
// UI. It is contained by a DOMUIManager.
-class DOMUI {
+class WebUI {
public:
- explicit DOMUI(TabContents* contents);
- virtual ~DOMUI();
+ explicit WebUI(TabContents* contents);
+ virtual ~WebUI();
// Called by RenderViewHost when the RenderView is first created. This is
// *not* called for every page load because in some cases
@@ -45,11 +45,11 @@ class DOMUI {
// page.
virtual void RenderViewReused(RenderViewHost* render_view_host) {}
- // Called when this becomes the active DOMUI instance for a re-used
- // RenderView; this is the point at which this DOMUI instance will receive
- // DOM messages instead of the previous DOMUI instance.
+ // Called when this becomes the active WebUI instance for a re-used
+ // RenderView; this is the point at which this WebUI instance will receive
+ // DOM messages instead of the previous WebUI instance.
//
- // If a DOMUI instance has code that is usually triggered from a JavaScript
+ // If a WebUI instance has code that is usually triggered from a JavaScript
// onload handler, this should be overridden to check to see if the web page's
// DOM is still intact (e.g., due to a back/forward navigation that remains
// within the same page), and if so trigger that code manually since onload
@@ -140,10 +140,10 @@ class DOMUI {
ui::ThemeProvider* GetThemeProvider() const;
- // May be overridden by DOMUI's which do not have a tab contents.
+ // May be overridden by WebUI's which do not have a tab contents.
virtual Profile* GetProfile() const;
- // May be overridden by DOMUI's which do not have a tab contents.
+ // May be overridden by WebUI's which do not have a tab contents.
virtual RenderViewHost* GetRenderViewHost() const;
TabContents* tab_contents() const { return tab_contents_; }
@@ -172,7 +172,7 @@ class DOMUI {
// The WebUIMessageHandlers we own.
std::vector<WebUIMessageHandler*> handlers_;
- // Non-owning pointer to the TabContents this DOMUI is associated with.
+ // Non-owning pointer to the TabContents this WebUI is associated with.
TabContents* tab_contents_;
private:
@@ -180,21 +180,26 @@ class DOMUI {
typedef std::map<std::string, MessageCallback*> MessageCallbackMap;
MessageCallbackMap message_callbacks_;
- DISALLOW_COPY_AND_ASSIGN(DOMUI);
+ DISALLOW_COPY_AND_ASSIGN(WebUI);
};
+// TODO(tfarina): Remove this when all the references to DOMUI class are fixed.
+// This is temporary until we can rename all the entries to WebUI.
+// See crbug.com/59945 for more information.
+typedef WebUI DOMUI;
+
// Messages sent from the DOM are forwarded via the WebUI to handler
// classes. These objects are owned by WebUI and destroyed when the
// host is destroyed.
class WebUIMessageHandler {
public:
- WebUIMessageHandler() : dom_ui_(NULL) {}
- virtual ~WebUIMessageHandler() {}
+ WebUIMessageHandler();
+ virtual ~WebUIMessageHandler();
- // Attaches |this| to |dom_ui| in order to handle messages from it. Declared
- // virtual so that subclasses can do special init work as soon as the dom_ui
+ // Attaches |this| to |web_ui| in order to handle messages from it. Declared
+ // virtual so that subclasses can do special init work as soon as the web_ui
// is provided. Returns |this| for convenience.
- virtual WebUIMessageHandler* Attach(DOMUI* dom_ui);
+ virtual WebUIMessageHandler* Attach(WebUI* web_ui);
protected:
// Adds "url" and "title" keys on incoming dictionary, setting title
@@ -212,10 +217,10 @@ class WebUIMessageHandler {
// Extract a string value from a list Value.
std::wstring ExtractStringValue(const ListValue* value);
- DOMUI* dom_ui_;
+ WebUI* dom_ui_; // TODO(tfarina): Rename the variable to web_ui_.
private:
DISALLOW_COPY_AND_ASSIGN(WebUIMessageHandler);
};
-#endif // CHROME_BROWSER_DOM_UI_DOM_UI_H_
+#endif // CHROME_BROWSER_DOM_UI_WEB_UI_H_
diff --git a/chrome/browser/dom_ui/web_ui_factory.cc b/chrome/browser/dom_ui/web_ui_factory.cc
index 8960b9d..d1bdaa6 100644
--- a/chrome/browser/dom_ui/web_ui_factory.cc
+++ b/chrome/browser/dom_ui/web_ui_factory.cc
@@ -63,21 +63,21 @@
const WebUITypeID WebUIFactory::kNoWebUI = NULL;
-// A function for creating a new DOMUI. The caller owns the return value, which
+// A function for creating a new WebUI. The caller owns the return value, which
// may be NULL (for example, if the URL refers to an non-existent extension).
-typedef DOMUI* (*WebUIFactoryFunction)(TabContents* tab_contents,
+typedef WebUI* (*WebUIFactoryFunction)(TabContents* tab_contents,
const GURL& url);
// Template for defining WebUIFactoryFunction.
template<class T>
-DOMUI* NewDOMUI(TabContents* contents, const GURL& url) {
+WebUI* NewDOMUI(TabContents* contents, const GURL& url) {
return new T(contents);
}
// Special case for extensions.
template<>
-DOMUI* NewDOMUI<ExtensionWebUI>(TabContents* contents, const GURL& url) {
- // Don't use a DOMUI for incognito tabs because we require extensions to run
+WebUI* NewDOMUI<ExtensionWebUI>(TabContents* contents, const GURL& url) {
+ // Don't use a WebUI for incognito tabs because we require extensions to run
// within a single process.
ExtensionService* service = contents->profile()->GetExtensionService();
if (service &&
@@ -87,9 +87,9 @@ DOMUI* NewDOMUI<ExtensionWebUI>(TabContents* contents, const GURL& url) {
return NULL;
}
-// Returns a function that can be used to create the right type of DOMUI for a
-// tab, based on its URL. Returns NULL if the URL doesn't have DOMUI associated
-// with it. Even if the factory function is valid, it may yield a NULL DOMUI
+// Returns a function that can be used to create the right type of WebUI for a
+// tab, based on its URL. Returns NULL if the URL doesn't have WebUI associated
+// with it. Even if the factory function is valid, it may yield a NULL WebUI
// when invoked for a particular tab - see NewDOMUI<ExtensionWebUI>.
static WebUIFactoryFunction GetWebUIFactoryFunction(Profile* profile,
const GURL& url) {
@@ -132,7 +132,7 @@ static WebUIFactoryFunction GetWebUIFactoryFunction(Profile* profile,
// Give about:about a generic Web UI so it can navigate to pages with Web UIs.
if (url.spec() == chrome::kChromeUIAboutAboutURL)
- return &NewDOMUI<DOMUI>;
+ return &NewDOMUI<WebUI>;
// We must compare hosts only since some of the Web UIs append extra stuff
// after the host name.
@@ -265,7 +265,7 @@ bool WebUIFactory::IsURLAcceptableForWebUI(Profile* profile, const GURL& url) {
}
// static
-DOMUI* WebUIFactory::CreateWebUIForURL(TabContents* tab_contents,
+WebUI* WebUIFactory::CreateWebUIForURL(TabContents* tab_contents,
const GURL& url) {
WebUIFactoryFunction function = GetWebUIFactoryFunction(
tab_contents->profile(), url);
diff --git a/chrome/browser/dom_ui/web_ui_factory.h b/chrome/browser/dom_ui/web_ui_factory.h
index bdee4a7..5f1ce9f 100644
--- a/chrome/browser/dom_ui/web_ui_factory.h
+++ b/chrome/browser/dom_ui/web_ui_factory.h
@@ -9,23 +9,23 @@
#include "base/basictypes.h"
#include "chrome/browser/favicon_service.h"
-class DOMUI;
+class WebUI;
class GURL;
class Profile;
class RefCountedMemory;
class TabContents;
-// An opaque identifier used to identify a DOMUI. This can only be compared to
-// kNoWebUI or other DOMUI types. See GetWebUIType.
+// An opaque identifier used to identify a WebUI. This can only be compared to
+// kNoWebUI or other WebUI types. See GetWebUIType.
typedef void* WebUITypeID;
class WebUIFactory {
public:
- // A special DOMUI type that signifies that a given page would not use the
+ // A special WebUI type that signifies that a given page would not use the
// Web UI system.
static const WebUITypeID kNoWebUI;
- // Returns a type identifier indicating what DOMUI we would use for the
+ // Returns a type identifier indicating what WebUI we would use for the
// given URL. This is useful for comparing the potential DOMUIs for two URLs.
// Returns kNoWebUI if the given URL will not use the Web UI system.
static WebUITypeID GetWebUIType(Profile* profile, const GURL& url);
@@ -44,10 +44,10 @@ class WebUIFactory {
// javascript: URLs or about:hang.
static bool IsURLAcceptableForWebUI(Profile* profile, const GURL& url);
- // Allocates a new DOMUI object for the given URL, and returns it. If the URL
+ // Allocates a new WebUI object for the given URL, and returns it. If the URL
// is not a Web UI URL, then it will return NULL. When non-NULL, ownership of
// the returned pointer is passed to the caller.
- static DOMUI* CreateWebUIForURL(TabContents* tab_contents, const GURL& url);
+ static WebUI* CreateWebUIForURL(TabContents* tab_contents, const GURL& url);
// Get the favicon for |page_url| and forward the result to the |request|
// when loaded.
@@ -56,7 +56,7 @@ class WebUIFactory {
const GURL& page_url);
private:
- // Gets the data for the favicon for a DOMUI page. Returns NULL if the DOMUI
+ // Gets the data for the favicon for a WebUI page. Returns NULL if the WebUI
// does not have a favicon.
static RefCountedMemory* GetFaviconResourceBytes(Profile* profile,
const GURL& page_url);
diff --git a/chrome/browser/extensions/extension_web_ui.h b/chrome/browser/extensions/extension_web_ui.h
index 5ae1233..b669f33 100644
--- a/chrome/browser/extensions/extension_web_ui.h
+++ b/chrome/browser/extensions/extension_web_ui.h
@@ -9,7 +9,7 @@
#include <string>
#include "base/scoped_ptr.h"
-#include "chrome/browser/dom_ui/dom_ui.h"
+#include "chrome/browser/dom_ui/web_ui.h"
#include "chrome/browser/extensions/extension_bookmark_manager_api.h"
#include "chrome/browser/extensions/extension_function_dispatcher.h"
#include "chrome/browser/favicon_service.h"
diff --git a/chrome/browser/extensions/extensions_ui.h b/chrome/browser/extensions/extensions_ui.h
index 73c41a7..2bad87f 100644
--- a/chrome/browser/extensions/extensions_ui.h
+++ b/chrome/browser/extensions/extensions_ui.h
@@ -1,4 +1,4 @@
-// Copyright (c) 2010 The Chromium Authors. All rights reserved.
+// 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.
@@ -11,7 +11,7 @@
#include "base/scoped_ptr.h"
#include "chrome/browser/dom_ui/chrome_url_data_manager.h"
-#include "chrome/browser/dom_ui/dom_ui.h"
+#include "chrome/browser/dom_ui/web_ui.h"
#include "chrome/browser/extensions/extension_install_ui.h"
#include "chrome/browser/extensions/pack_extension_job.h"
#include "chrome/browser/shell_dialogs.h"
diff --git a/chrome/browser/printing/print_dialog_cloud.cc b/chrome/browser/printing/print_dialog_cloud.cc
index 0cc3cdd..f611501 100644
--- a/chrome/browser/printing/print_dialog_cloud.cc
+++ b/chrome/browser/printing/print_dialog_cloud.cc
@@ -12,7 +12,7 @@
#include "chrome/browser/browser_list.h"
#include "chrome/browser/browser_thread.h"
#include "chrome/browser/debugger/devtools_manager.h"
-#include "chrome/browser/dom_ui/dom_ui.h"
+#include "chrome/browser/dom_ui/web_ui.h"
#include "chrome/browser/dom_ui/web_ui_util.h"
#include "chrome/browser/prefs/pref_service.h"
#include "chrome/browser/printing/cloud_print/cloud_print_url.h"
diff --git a/chrome/browser/printing/print_dialog_cloud_internal.h b/chrome/browser/printing/print_dialog_cloud_internal.h
index b823258..3a1d894 100644
--- a/chrome/browser/printing/print_dialog_cloud_internal.h
+++ b/chrome/browser/printing/print_dialog_cloud_internal.h
@@ -1,4 +1,4 @@
-// Copyright (c) 2010 The Chromium Authors. All rights reserved.
+// 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.
@@ -12,8 +12,8 @@
#include "base/file_path.h"
#include "base/scoped_ptr.h"
#include "base/synchronization/lock.h"
-#include "chrome/browser/dom_ui/dom_ui.h"
#include "chrome/browser/dom_ui/html_dialog_ui.h"
+#include "chrome/browser/dom_ui/web_ui.h"
#include "chrome/common/notification_observer.h"
#include "chrome/common/notification_registrar.h"
diff --git a/chrome/browser/printing/print_preview_message_handler.cc b/chrome/browser/printing/print_preview_message_handler.cc
index 7fa141a..fdf3b30 100644
--- a/chrome/browser/printing/print_preview_message_handler.cc
+++ b/chrome/browser/printing/print_preview_message_handler.cc
@@ -54,7 +54,7 @@ void PrintPreviewMessageHandler::OnPagesReadyForPreview(
#if defined(OS_MACOSX)
PrintPreviewUI* print_preview_ui =
- static_cast<PrintPreviewUI*>(print_preview_tab->dom_ui());
+ static_cast<PrintPreviewUI*>(print_preview_tab->web_ui());
print_preview_ui->html_source()->SetPrintPreviewData(
std::make_pair(shared_buf, params.data_size));
print_preview_ui->PreviewDataIsAvailable();
diff --git a/chrome/browser/remoting/remoting_options_handler.cc b/chrome/browser/remoting/remoting_options_handler.cc
index e4658ab..02ebac6 100644
--- a/chrome/browser/remoting/remoting_options_handler.cc
+++ b/chrome/browser/remoting/remoting_options_handler.cc
@@ -7,7 +7,7 @@
#include "base/utf_string_conversions.h"
#include "base/values.h"
#include "chrome/common/remoting/chromoting_host_info.h"
-#include "chrome/browser/dom_ui/dom_ui.h"
+#include "chrome/browser/dom_ui/web_ui.h"
#include "chrome/browser/service/service_process_control_manager.h"
#include "grit/generated_resources.h"
#include "ui/base/l10n/l10n_util.h"
@@ -15,7 +15,7 @@
namespace remoting {
RemotingOptionsHandler::RemotingOptionsHandler()
- : dom_ui_(NULL),
+ : web_ui_(NULL),
process_control_(NULL) {
}
@@ -24,12 +24,12 @@ RemotingOptionsHandler::~RemotingOptionsHandler() {
process_control_->RemoveMessageHandler(this);
}
-void RemotingOptionsHandler::Init(DOMUI* dom_ui) {
- dom_ui_ = dom_ui;
+void RemotingOptionsHandler::Init(WebUI* web_ui) {
+ web_ui_ = web_ui;
process_control_ =
ServiceProcessControlManager::GetInstance()->GetProcessControl(
- dom_ui_->GetProfile());
+ web_ui_->GetProfile());
process_control_->AddMessageHandler(this);
if (!process_control_->RequestRemotingHostStatus()) {
@@ -56,7 +56,7 @@ void RemotingOptionsHandler::SetStatus(
FundamentalValue enabled_value(enabled);
StringValue status_value(status);
- dom_ui_->CallJavascriptFunction(L"options.AdvancedOptions.SetRemotingStatus",
+ web_ui_->CallJavascriptFunction(L"options.AdvancedOptions.SetRemotingStatus",
enabled_value, status_value);
}
diff --git a/chrome/browser/remoting/remoting_options_handler.h b/chrome/browser/remoting/remoting_options_handler.h
index 8a15cd3..634e435 100644
--- a/chrome/browser/remoting/remoting_options_handler.h
+++ b/chrome/browser/remoting/remoting_options_handler.h
@@ -5,9 +5,10 @@
#ifndef CHROME_BROWSER_REMOTING_REMOTING_OPTIONS_HANDLER_H_
#define CHROME_BROWSER_REMOTING_REMOTING_OPTIONS_HANDLER_H_
+#include "base/basictypes.h"
#include "chrome/browser/service/service_process_control.h"
-class DOMUI;
+class WebUI;
namespace remoting {
@@ -16,13 +17,12 @@ namespace remoting {
// messages from the service process (by registering MessageHandler
// callback in the ServiceProcessControl) and updates current status
// as neccessary.
-class RemotingOptionsHandler
- : public ServiceProcessControl::MessageHandler {
+class RemotingOptionsHandler : public ServiceProcessControl::MessageHandler {
public:
RemotingOptionsHandler();
virtual ~RemotingOptionsHandler();
- void Init(DOMUI* dom_ui);
+ void Init(WebUI* web_ui);
// ServiceProcessControl::MessageHandler interface.
virtual void OnRemotingHostInfo(
@@ -31,7 +31,7 @@ class RemotingOptionsHandler
private:
void SetStatus(bool enabled, const std::string& login);
- DOMUI* dom_ui_;
+ WebUI* web_ui_;
ServiceProcessControl* process_control_;
DISALLOW_COPY_AND_ASSIGN(RemotingOptionsHandler);
diff --git a/chrome/browser/remoting/setup_flow.cc b/chrome/browser/remoting/setup_flow.cc
index 8c50ec4..dc06dd4 100644
--- a/chrome/browser/remoting/setup_flow.cc
+++ b/chrome/browser/remoting/setup_flow.cc
@@ -51,10 +51,10 @@ SetupFlowStep* SetupFlowStepBase::GetNextStep() {
void SetupFlowStepBase::ExecuteJavascriptInIFrame(
const std::wstring& iframe_xpath, const std::wstring& js) {
- DOMUI* dom_ui = flow()->dom_ui();
- DCHECK(dom_ui);
+ WebUI* web_ui = flow()->web_ui();
+ DCHECK(web_ui);
- RenderViewHost* rvh = dom_ui->tab_contents()->render_view_host();
+ RenderViewHost* rvh = web_ui->tab_contents()->render_view_host();
rvh->ExecuteJavascriptInWebFrame(WideToUTF16Hack(iframe_xpath),
WideToUTF16Hack(js));
}
@@ -82,7 +82,7 @@ void SetupFlowErrorStepBase::DoStart() {
L"setMessage('" + UTF16ToWide(GetErrorMessage()) + L"');";
ExecuteJavascriptInIFrame(kErrorIframeXPath, javascript);
- flow()->dom_ui()->CallJavascriptFunction(L"showError");
+ flow()->web_ui()->CallJavascriptFunction(L"showError");
ExecuteJavascriptInIFrame(kErrorIframeXPath, L"onPageShown();");
}
@@ -108,7 +108,7 @@ void SetupFlowDoneStep::DoStart() {
L"setMessage('" + UTF16ToWide(message_) + L"');";
ExecuteJavascriptInIFrame(kDoneIframeXPath, javascript);
- flow()->dom_ui()->CallJavascriptFunction(L"showSetupDone");
+ flow()->web_ui()->CallJavascriptFunction(L"showSetupDone");
ExecuteJavascriptInIFrame(kDoneIframeXPath, L"onPageShown();");
}
@@ -118,7 +118,7 @@ SetupFlowContext::~SetupFlowContext() { }
SetupFlow::SetupFlow(const std::string& args, Profile* profile,
SetupFlowStep* first_step)
- : dom_ui_(NULL),
+ : web_ui_(NULL),
dialog_start_args_(args),
profile_(profile),
current_step_(first_step) {
@@ -203,16 +203,16 @@ bool SetupFlow::ShouldShowDialogTitle() const {
return true;
}
-WebUIMessageHandler* SetupFlow::Attach(DOMUI* dom_ui) {
- dom_ui_ = dom_ui;
+WebUIMessageHandler* SetupFlow::Attach(WebUI* web_ui) {
+ web_ui_ = web_ui;
StartCurrentStep();
- return WebUIMessageHandler::Attach(dom_ui);
+ return WebUIMessageHandler::Attach(web_ui);
}
void SetupFlow::RegisterMessages() {
- dom_ui_->RegisterMessageCallback(
+ web_ui_->RegisterMessageCallback(
"SubmitAuth", NewCallback(this, &SetupFlow::HandleSubmitAuth));
- dom_ui_->RegisterMessageCallback(
+ web_ui_->RegisterMessageCallback(
"RemotingSetup", NewCallback(this, &SetupFlow::HandleUIMessage));
}
diff --git a/chrome/browser/remoting/setup_flow.h b/chrome/browser/remoting/setup_flow.h
index cd207e3..b8a7de6 100644
--- a/chrome/browser/remoting/setup_flow.h
+++ b/chrome/browser/remoting/setup_flow.h
@@ -8,6 +8,7 @@
#include "base/callback.h"
#include "base/scoped_ptr.h"
#include "chrome/browser/dom_ui/html_dialog_ui.h"
+#include "chrome/browser/dom_ui/web_ui.h"
#include "chrome/common/remoting/chromoting_host_info.h"
class ListValue;
@@ -168,7 +169,7 @@ class SetupFlow : public WebUIMessageHandler,
static SetupFlow* OpenSetupDialog(Profile* profile);
- DOMUI* dom_ui() { return dom_ui_; }
+ WebUI* web_ui() { return web_ui_; }
Profile* profile() { return profile_; }
SetupFlowContext* context() { return &context_; }
@@ -189,7 +190,7 @@ class SetupFlow : public WebUIMessageHandler,
virtual bool ShouldShowDialogTitle() const;
// WebUIMessageHandler implementation.
- virtual WebUIMessageHandler* Attach(DOMUI* dom_ui);
+ virtual WebUIMessageHandler* Attach(WebUI* web_ui);
virtual void RegisterMessages();
// Message handlers for the messages we receive from UI.
@@ -201,7 +202,7 @@ class SetupFlow : public WebUIMessageHandler,
// Pointer to the Web UI. This is provided by RemotingSetupMessageHandler
// when attached.
- DOMUI* dom_ui_;
+ WebUI* web_ui_;
// The args to pass to the initial page.
std::string dialog_start_args_;
diff --git a/chrome/browser/remoting/setup_flow_get_status_step.cc b/chrome/browser/remoting/setup_flow_get_status_step.cc
index d77e1a1..02e47ca 100644
--- a/chrome/browser/remoting/setup_flow_get_status_step.cc
+++ b/chrome/browser/remoting/setup_flow_get_status_step.cc
@@ -41,7 +41,7 @@ void SetupFlowGetStatusStep::OnRemotingHostInfo(
}
void SetupFlowGetStatusStep::DoStart() {
- flow()->dom_ui()->CallJavascriptFunction(L"showSettingUp");
+ flow()->web_ui()->CallJavascriptFunction(L"showSettingUp");
process_control_ =
ServiceProcessControlManager::GetInstance()->GetProcessControl(
diff --git a/chrome/browser/remoting/setup_flow_login_step.cc b/chrome/browser/remoting/setup_flow_login_step.cc
index 0450e29..6170198 100644
--- a/chrome/browser/remoting/setup_flow_login_step.cc
+++ b/chrome/browser/remoting/setup_flow_login_step.cc
@@ -132,10 +132,10 @@ void SetupFlowLoginStep::DoStart() {
}
void SetupFlowLoginStep::ShowGaiaLogin(const DictionaryValue& args) {
- DOMUI* dom_ui = flow()->dom_ui();
- DCHECK(dom_ui);
+ WebUI* web_ui = flow()->web_ui();
+ DCHECK(web_ui);
- dom_ui->CallJavascriptFunction(L"showLogin");
+ web_ui->CallJavascriptFunction(L"showLogin");
std::string json;
base::JSONWriter::Write(&args, false, &json);
diff --git a/chrome/browser/remoting/setup_flow_register_step.cc b/chrome/browser/remoting/setup_flow_register_step.cc
index d99eb7e..699e290 100644
--- a/chrome/browser/remoting/setup_flow_register_step.cc
+++ b/chrome/browser/remoting/setup_flow_register_step.cc
@@ -1,4 +1,4 @@
-// Copyright (c) 2010 The Chromium Authors. All rights reserved.
+// 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.
@@ -25,7 +25,7 @@ void SetupFlowRegisterStep::Cancel() {
}
void SetupFlowRegisterStep::DoStart() {
- flow()->dom_ui()->CallJavascriptFunction(L"showSettingUp");
+ flow()->web_ui()->CallJavascriptFunction(L"showSettingUp");
request_.reset(new DirectoryAddRequest(
flow()->profile()->GetRequestContext()));
diff --git a/chrome/browser/remoting/setup_flow_start_host_step.cc b/chrome/browser/remoting/setup_flow_start_host_step.cc
index 3e555a2..8c53c2e 100644
--- a/chrome/browser/remoting/setup_flow_start_host_step.cc
+++ b/chrome/browser/remoting/setup_flow_start_host_step.cc
@@ -44,7 +44,7 @@ void SetupFlowStartHostStep::OnRemotingHostInfo(
}
void SetupFlowStartHostStep::DoStart() {
- flow()->dom_ui()->CallJavascriptFunction(L"showSettingUp");
+ flow()->web_ui()->CallJavascriptFunction(L"showSettingUp");
process_control_ =
ServiceProcessControlManager::GetInstance()->GetProcessControl(
diff --git a/chrome/browser/tab_contents/render_view_host_manager.cc b/chrome/browser/tab_contents/render_view_host_manager.cc
index 8be2045..06120ab 100644
--- a/chrome/browser/tab_contents/render_view_host_manager.cc
+++ b/chrome/browser/tab_contents/render_view_host_manager.cc
@@ -6,7 +6,7 @@
#include "base/command_line.h"
#include "base/logging.h"
-#include "chrome/browser/dom_ui/dom_ui.h"
+#include "chrome/browser/dom_ui/web_ui.h"
#include "chrome/browser/dom_ui/web_ui_factory.h"
#include "chrome/browser/extensions/extension_service.h"
#include "chrome/browser/profiles/profile.h"
@@ -179,7 +179,7 @@ void RenderViewHostManager::DidNavigateMainFrame(
DCHECK(render_view_host == render_view_host_);
// Even when there is no pending RVH, there may be a pending Web UI.
- if (pending_dom_ui_.get())
+ if (pending_web_ui_.get())
CommitPending();
return;
}
@@ -199,9 +199,9 @@ void RenderViewHostManager::DidNavigateMainFrame(
}
}
-void RenderViewHostManager::SetDOMUIPostCommit(DOMUI* dom_ui) {
- DCHECK(!dom_ui_.get());
- dom_ui_.reset(dom_ui);
+void RenderViewHostManager::SetDOMUIPostCommit(WebUI* web_ui) {
+ DCHECK(!web_ui_.get());
+ web_ui_.reset(web_ui);
}
void RenderViewHostManager::RendererAbortedProvisionalLoad(
@@ -480,10 +480,10 @@ bool RenderViewHostManager::CreatePendingRenderView(
bool RenderViewHostManager::InitRenderView(RenderViewHost* render_view_host,
const NavigationEntry& entry) {
- // If the pending navigation is to a DOMUI, tell the RenderView about any
+ // If the pending navigation is to a WebUI, tell the RenderView about any
// bindings it will need enabled.
- if (pending_dom_ui_.get())
- render_view_host->AllowBindings(pending_dom_ui_->bindings());
+ if (pending_web_ui_.get())
+ render_view_host->AllowBindings(pending_web_ui_->bindings());
// Tell the RenderView whether it will be used for an extension process.
Profile* profile = delegate_->GetControllerForRenderManager().profile();
@@ -497,15 +497,15 @@ bool RenderViewHostManager::InitRenderView(RenderViewHost* render_view_host,
void RenderViewHostManager::CommitPending() {
// First check whether we're going to want to focus the location bar after
// this commit. We do this now because the navigation hasn't formally
- // committed yet, so if we've already cleared |pending_dom_ui_| the call chain
+ // committed yet, so if we've already cleared |pending_web_ui_| the call chain
// this triggers won't be able to figure out what's going on.
bool will_focus_location_bar = delegate_->FocusLocationBarByDefault();
// Next commit the Web UI, if any.
- dom_ui_.swap(pending_dom_ui_);
- if (dom_ui_.get() && pending_dom_ui_.get() && !pending_render_view_host_)
- dom_ui_->DidBecomeActiveForReusedRenderView();
- pending_dom_ui_.reset();
+ web_ui_.swap(pending_web_ui_);
+ if (web_ui_.get() && pending_web_ui_.get() && !pending_render_view_host_)
+ web_ui_->DidBecomeActiveForReusedRenderView();
+ pending_web_ui_.reset();
// It's possible for the pending_render_view_host_ to be NULL when we aren't
// crossing process boundaries. If so, we just needed to handle the Web UI
@@ -577,9 +577,9 @@ RenderViewHost* RenderViewHostManager::UpdateRendererStateForNavigate(
// page. We'll use this later to give the page special access. This must
// happen before the new renderer is created below so it will get bindings.
// It must also happen after the above conditional call to CancelPending(),
- // otherwise CancelPending may clear the pending_dom_ui_ and the page will
+ // otherwise CancelPending may clear the pending_web_ui_ and the page will
// not have it's bindings set appropriately.
- pending_dom_ui_.reset(delegate_->CreateDOMUIForRenderManager(entry.url()));
+ pending_web_ui_.reset(delegate_->CreateDOMUIForRenderManager(entry.url()));
// render_view_host_ will not be deleted before the end of this method, so we
// don't have to worry about this SiteInstance's ref count dropping to zero.
@@ -647,8 +647,8 @@ RenderViewHost* RenderViewHostManager::UpdateRendererStateForNavigate(
return pending_render_view_host_;
} else {
- if (pending_dom_ui_.get() && render_view_host_->IsRenderViewLive())
- pending_dom_ui_->RenderViewReused(render_view_host_);
+ if (pending_web_ui_.get() && render_view_host_->IsRenderViewLive())
+ pending_web_ui_->RenderViewReused(render_view_host_);
// The renderer can exit view source mode when any error or cancellation
// happen. We must overwrite to recover the mode.
@@ -669,7 +669,7 @@ void RenderViewHostManager::CancelPending() {
pending_render_view_host_ = NULL;
pending_render_view_host->Shutdown();
- pending_dom_ui_.reset();
+ pending_web_ui_.reset();
}
void RenderViewHostManager::RenderViewDeleted(RenderViewHost* rvh) {
@@ -687,7 +687,7 @@ void RenderViewHostManager::RenderViewDeleted(RenderViewHost* rvh) {
}
void RenderViewHostManager::SwapInRenderViewHost(RenderViewHost* rvh) {
- dom_ui_.reset();
+ web_ui_.reset();
// Hide the current view and prepare to destroy it.
if (render_view_host_->view())
diff --git a/chrome/browser/tab_contents/render_view_host_manager.h b/chrome/browser/tab_contents/render_view_host_manager.h
index f89ad238..1727a1b 100644
--- a/chrome/browser/tab_contents/render_view_host_manager.h
+++ b/chrome/browser/tab_contents/render_view_host_manager.h
@@ -1,4 +1,4 @@
-// Copyright (c) 2010 The Chromium Authors. All rights reserved.
+// 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.
@@ -13,7 +13,7 @@
#include "chrome/common/notification_registrar.h"
#include "chrome/common/notification_observer.h"
-class DOMUI;
+class WebUI;
class InterstitialPage;
class NavigationController;
class NavigationEntry;
@@ -52,10 +52,10 @@ class RenderViewHostManager
virtual void NotifySwappedFromRenderManager() = 0;
virtual NavigationController& GetControllerForRenderManager() = 0;
- // Creates a DOMUI object for the given URL if one applies. Ownership of the
- // returned pointer will be passed to the caller. If no DOMUI applies,
+ // Creates a WebUI object for the given URL if one applies. Ownership of the
+ // returned pointer will be passed to the caller. If no WebUI applies,
// returns NULL.
- virtual DOMUI* CreateDOMUIForRenderManager(const GURL& url) = 0;
+ virtual WebUI* CreateDOMUIForRenderManager(const GURL& url) = 0;
// Returns the navigation entry of the current navigation, or NULL if there
// is none.
@@ -109,10 +109,10 @@ class RenderViewHostManager
}
// Returns the current committed Web UI or NULL if none applies.
- DOMUI* dom_ui() const { return dom_ui_.get(); }
+ WebUI* web_ui() const { return web_ui_.get(); }
// Returns the Web UI for the pending navigation, or NULL of none applies.
- DOMUI* pending_dom_ui() const { return pending_dom_ui_.get(); }
+ WebUI* pending_web_ui() const { return pending_web_ui_.get(); }
// Called when we want to instruct the renderer to navigate to the given
// navigation entry. It may create a new RenderViewHost or re-use an existing
@@ -137,10 +137,10 @@ class RenderViewHostManager
// Called when a renderer's main frame navigates.
void DidNavigateMainFrame(RenderViewHost* render_view_host);
- // Set the DOMUI after committing a page load. This is useful for navigations
- // initiated from a renderer, where we want to give the new renderer DOMUI
+ // Set the WebUI after committing a page load. This is useful for navigations
+ // initiated from a renderer, where we want to give the new renderer WebUI
// privileges from the originating renderer.
- void SetDOMUIPostCommit(DOMUI* dom_ui);
+ void SetDOMUIPostCommit(WebUI* web_ui);
// Called when a provisional load on the given renderer is aborted.
void RendererAbortedProvisionalLoad(RenderViewHost* render_view_host);
@@ -215,7 +215,7 @@ class RenderViewHostManager
bool InitRenderView(RenderViewHost* render_view_host,
const NavigationEntry& entry);
- // Sets the pending RenderViewHost/DOMUI to be the active one. Note that this
+ // Sets the pending RenderViewHost/WebUI to be the active one. Note that this
// doesn't require the pending render_view_host_ pointer to be non-NULL, since
// there could be Web UI switching as well. Call this for every commit.
void CommitPending();
@@ -241,19 +241,19 @@ class RenderViewHostManager
// non-DOM-UI pages). This object is responsible for all communication with
// a child RenderView instance.
RenderViewHost* render_view_host_;
- scoped_ptr<DOMUI> dom_ui_;
+ scoped_ptr<WebUI> web_ui_;
// A RenderViewHost used to load a cross-site page. This remains hidden
// while a cross-site request is pending until it calls DidNavigate. It may
// have an associated Web UI, in which case the Web UI pointer will be non-
// NULL.
//
- // The pending_dom_ui may be non-NULL even when the pending_render_view_host_
+ // The pending_web_ui may be non-NULL even when the pending_render_view_host_
// is. This will happen when we're transitioning between two Web UI pages:
// the RVH won't be swapped, so the pending pointer will be unused, but there
// will be a pending Web UI associated with the navigation.
RenderViewHost* pending_render_view_host_;
- scoped_ptr<DOMUI> pending_dom_ui_;
+ scoped_ptr<WebUI> pending_web_ui_;
// The intersitial page currently shown if any, not own by this class
// (the InterstitialPage is self-owned, it deletes itself when hidden).
diff --git a/chrome/browser/tab_contents/render_view_host_manager_unittest.cc b/chrome/browser/tab_contents/render_view_host_manager_unittest.cc
index a2df005..9bd7177 100644
--- a/chrome/browser/tab_contents/render_view_host_manager_unittest.cc
+++ b/chrome/browser/tab_contents/render_view_host_manager_unittest.cc
@@ -1,4 +1,4 @@
-// Copyright (c) 2010 The Chromium Authors. All rights reserved.
+// 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.
@@ -263,8 +263,8 @@ TEST_F(RenderViewHostManagerTest, DOMUI) {
// The Web UI is committed immediately because the RenderViewHost has not been
// used yet. UpdateRendererStateForNavigate() took the short cut path.
- EXPECT_FALSE(manager.pending_dom_ui());
- EXPECT_TRUE(manager.dom_ui());
+ EXPECT_FALSE(manager.pending_web_ui());
+ EXPECT_TRUE(manager.web_ui());
// Commit.
manager.DidNavigateMainFrame(host);
diff --git a/chrome/browser/tab_contents/tab_contents.cc b/chrome/browser/tab_contents/tab_contents.cc
index 7a9d499..e7d3f71 100644
--- a/chrome/browser/tab_contents/tab_contents.cc
+++ b/chrome/browser/tab_contents/tab_contents.cc
@@ -26,7 +26,7 @@
#include "chrome/browser/defaults.h"
#include "chrome/browser/desktop_notification_handler.h"
#include "chrome/browser/dom_operation_notification_details.h"
-#include "chrome/browser/dom_ui/dom_ui.h"
+#include "chrome/browser/dom_ui/web_ui.h"
#include "chrome/browser/download/download_item_model.h"
#include "chrome/browser/download/download_manager.h"
#include "chrome/browser/download/download_request_limiter.h"
@@ -609,14 +609,14 @@ const string16& TabContents::GetTitle() const {
return entry->GetTitleForDisplay(profile()->GetPrefs()->
GetString(prefs::kAcceptLanguages));
}
- DOMUI* our_dom_ui = render_manager_.pending_dom_ui() ?
- render_manager_.pending_dom_ui() : render_manager_.dom_ui();
- if (our_dom_ui) {
+ WebUI* our_web_ui = render_manager_.pending_web_ui() ?
+ render_manager_.pending_web_ui() : render_manager_.web_ui();
+ if (our_web_ui) {
// Don't override the title in view source mode.
entry = controller_.GetActiveEntry();
if (!(entry && entry->IsViewSourceMode())) {
// Give the Web UI the chance to override our title.
- const string16& title = our_dom_ui->overridden_title();
+ const string16& title = our_web_ui->overridden_title();
if (!title.empty())
return title;
}
@@ -667,9 +667,9 @@ bool TabContents::ShouldDisplayURL() {
return true;
}
- DOMUI* dom_ui = GetDOMUIForCurrentState();
- if (dom_ui)
- return !dom_ui->should_hide_url();
+ WebUI* web_ui = GetDOMUIForCurrentState();
+ if (web_ui)
+ return !web_ui->should_hide_url();
return true;
}
@@ -703,9 +703,9 @@ bool TabContents::ShouldDisplayFavIcon() {
if (controller_.GetLastCommittedEntry() && controller_.pending_entry())
return true;
- DOMUI* dom_ui = GetDOMUIForCurrentState();
- if (dom_ui)
- return !dom_ui->hide_favicon();
+ WebUI* web_ui = GetDOMUIForCurrentState();
+ if (web_ui)
+ return !web_ui->hide_favicon();
return true;
}
@@ -1093,9 +1093,9 @@ void TabContents::FocusThroughTabTraversal(bool reverse) {
}
bool TabContents::FocusLocationBarByDefault() {
- DOMUI* dom_ui = GetDOMUIForCurrentState();
- if (dom_ui)
- return dom_ui->focus_location_bar_by_default();
+ WebUI* web_ui = GetDOMUIForCurrentState();
+ if (web_ui)
+ return web_ui->focus_location_bar_by_default();
NavigationEntry* entry = controller_.GetActiveEntry();
if (entry && entry->url() == GURL(chrome::kAboutBlankURL))
return true;
@@ -1203,17 +1203,17 @@ bool TabContents::ShouldShowBookmarkBar() {
// is so the bookmarks bar disappears at the same time the page does.
if (controller_.GetLastCommittedEntry()) {
// Not the first load, always use the committed Web UI.
- return (render_manager_.dom_ui() == NULL) ?
- false : render_manager_.dom_ui()->force_bookmark_bar_visible();
+ return (render_manager_.web_ui() == NULL) ?
+ false : render_manager_.web_ui()->force_bookmark_bar_visible();
}
// When it's the first load, we know either the pending one or the committed
// one will have the Web UI in it (see GetDOMUIForCurrentState), and only one
// of them will be valid, so we can just check both.
- if (render_manager_.pending_dom_ui())
- return render_manager_.pending_dom_ui()->force_bookmark_bar_visible();
- return (render_manager_.dom_ui() == NULL) ?
- false : render_manager_.dom_ui()->force_bookmark_bar_visible();
+ if (render_manager_.pending_web_ui())
+ return render_manager_.pending_web_ui()->force_bookmark_bar_visible();
+ return (render_manager_.web_ui() == NULL) ?
+ false : render_manager_.web_ui()->force_bookmark_bar_visible();
}
void TabContents::ToolbarSizeChanged(bool is_animating) {
@@ -1733,8 +1733,8 @@ void TabContents::ExpireInfoBars(
}
}
-DOMUI* TabContents::GetDOMUIForCurrentState() {
- // When there is a pending navigation entry, we want to use the pending DOMUI
+WebUI* TabContents::GetDOMUIForCurrentState() {
+ // When there is a pending navigation entry, we want to use the pending WebUI
// that goes along with it to control the basic flags. For example, we want to
// show the pending URL in the URL bar, so we want the display_url flag to
// be from the pending entry.
@@ -1748,7 +1748,7 @@ DOMUI* TabContents::GetDOMUIForCurrentState() {
//
// - For subsequent new tabs, they'll get a new SiteInstance which will then
// get switched to the one previously associated with the new tab pages.
- // This switching will cause the manager to commit the RVH/DOMUI. So we'll
+ // This switching will cause the manager to commit the RVH/WebUI. So we'll
// have a committed Web UI in this case.
//
// This condition handles all of these cases:
@@ -1768,9 +1768,9 @@ DOMUI* TabContents::GetDOMUIForCurrentState() {
// -> Use committed Web UI.
if (controller_.pending_entry() &&
(controller_.GetLastCommittedEntry() ||
- render_manager_.pending_dom_ui()))
- return render_manager_.pending_dom_ui();
- return render_manager_.dom_ui();
+ render_manager_.pending_web_ui()))
+ return render_manager_.pending_web_ui();
+ return render_manager_.web_ui();
}
void TabContents::DidNavigateMainFramePostCommit(
@@ -1782,11 +1782,11 @@ void TabContents::DidNavigateMainFramePostCommit(
// privileges.
if (opener_web_ui_type_ ==
WebUIFactory::GetWebUIType(profile(), GetURL())) {
- DOMUI* dom_ui = WebUIFactory::CreateWebUIForURL(this, GetURL());
- // dom_ui might be NULL if the URL refers to a non-existent extension.
- if (dom_ui) {
- render_manager_.SetDOMUIPostCommit(dom_ui);
- dom_ui->RenderViewCreated(render_view_host());
+ WebUI* web_ui = WebUIFactory::CreateWebUIForURL(this, GetURL());
+ // web_ui might be NULL if the URL refers to a non-existent extension.
+ if (web_ui) {
+ render_manager_.SetDOMUIPostCommit(web_ui);
+ web_ui->RenderViewCreated(render_view_host());
}
}
opener_web_ui_type_ = WebUIFactory::kNoWebUI;
@@ -2263,8 +2263,8 @@ void TabContents::RenderViewCreated(RenderViewHost* render_view_host) {
// When we're creating views, we're still doing initial setup, so we always
// use the pending Web UI rather than any possibly existing committed one.
- if (render_manager_.pending_dom_ui()) {
- render_manager_.pending_dom_ui()->RenderViewCreated(render_view_host);
+ if (render_manager_.pending_web_ui()) {
+ render_manager_.pending_web_ui()->RenderViewCreated(render_view_host);
}
if (entry->IsViewSourceMode()) {
@@ -2587,7 +2587,7 @@ void TabContents::DocumentOnLoadCompletedInMainFrame(
void TabContents::RequestOpenURL(const GURL& url, const GURL& referrer,
WindowOpenDisposition disposition) {
- if (render_manager_.dom_ui()) {
+ if (render_manager_.web_ui()) {
// When we're a Web UI, it will provide a page transition type for us (this
// is so the new tab page can specify AUTO_BOOKMARK for automatically
// generated suggestions).
@@ -2597,7 +2597,7 @@ void TabContents::RequestOpenURL(const GURL& url, const GURL& referrer,
// chrome: URLs might have search terms or other stuff we don't want to
// send to the site), so we send no referrer.
OpenURL(url, GURL(), disposition,
- render_manager_.dom_ui()->link_transition_type());
+ render_manager_.web_ui()->link_transition_type());
} else {
OpenURL(url, referrer, disposition, PageTransition::LINK);
}
@@ -2609,13 +2609,13 @@ void TabContents::DomOperationResponse(const std::string& json_string,
void TabContents::ProcessDOMUIMessage(
const ViewHostMsg_DomMessage_Params& params) {
- if (!render_manager_.dom_ui()) {
+ if (!render_manager_.web_ui()) {
// This can happen if someone uses window.open() to open an extension URL
// from a non-extension context.
render_view_host()->BlockExtensionRequest(params.request_id);
return;
}
- render_manager_.dom_ui()->ProcessDOMUIMessage(params);
+ render_manager_.web_ui()->ProcessDOMUIMessage(params);
}
void TabContents::ProcessExternalHostMessage(const std::string& message,
@@ -2783,9 +2783,9 @@ GURL TabContents::GetAlternateErrorPageURL() const {
WebPreferences TabContents::GetWebkitPrefs() {
Profile* profile = render_view_host()->process()->profile();
- bool is_dom_ui = false;
+ bool is_web_ui = false;
WebPreferences web_prefs =
- RenderViewHostDelegateHelper::GetWebkitPrefs(profile, is_dom_ui);
+ RenderViewHostDelegateHelper::GetWebkitPrefs(profile, is_web_ui);
// Force accelerated compositing and 2d canvas off for chrome: and
// chrome-extension: pages.
@@ -2949,7 +2949,7 @@ NavigationController& TabContents::GetControllerForRenderManager() {
return controller();
}
-DOMUI* TabContents::CreateDOMUIForRenderManager(const GURL& url) {
+WebUI* TabContents::CreateDOMUIForRenderManager(const GURL& url) {
return WebUIFactory::CreateWebUIForURL(this, url);
}
diff --git a/chrome/browser/tab_contents/tab_contents.h b/chrome/browser/tab_contents/tab_contents.h
index f9b34c8..930c379 100644
--- a/chrome/browser/tab_contents/tab_contents.h
+++ b/chrome/browser/tab_contents/tab_contents.h
@@ -57,7 +57,7 @@ class PrintViewManager;
class AutocompleteHistoryManager;
class AutoFillManager;
class BlockedContentContainer;
-class DOMUI;
+class WebUI;
class DesktopNotificationHandler;
class DownloadItem;
class Extension;
@@ -159,9 +159,9 @@ class TabContents : public PageNavigator,
return render_manager_.current_host();
}
- DOMUI* dom_ui() const {
- return render_manager_.dom_ui() ? render_manager_.dom_ui()
- : render_manager_.pending_dom_ui();
+ WebUI* web_ui() const {
+ return render_manager_.web_ui() ? render_manager_.web_ui()
+ : render_manager_.pending_web_ui();
}
// Returns the currently active RenderWidgetHostView. This may change over
@@ -812,9 +812,9 @@ class TabContents : public PageNavigator,
void ExpireInfoBars(
const NavigationController::LoadCommittedDetails& details);
- // Returns the DOMUI for the current state of the tab. This will either be
- // the pending DOMUI, the committed DOMUI, or NULL.
- DOMUI* GetDOMUIForCurrentState();
+ // Returns the WebUI for the current state of the tab. This will either be
+ // the pending WebUI, the committed WebUI, or NULL.
+ WebUI* GetDOMUIForCurrentState();
// Navigation helpers --------------------------------------------------------
//
@@ -991,7 +991,7 @@ class TabContents : public PageNavigator,
virtual void UpdateRenderViewSizeForRenderManager();
virtual void NotifySwappedFromRenderManager();
virtual NavigationController& GetControllerForRenderManager();
- virtual DOMUI* CreateDOMUIForRenderManager(const GURL& url);
+ virtual WebUI* CreateDOMUIForRenderManager(const GURL& url);
virtual NavigationEntry* GetLastCommittedNavigationEntryForRenderManager();
// Initializes the given renderer if necessary and creates the view ID
diff --git a/chrome/browser/ui/cocoa/html_dialog_window_controller_unittest.mm b/chrome/browser/ui/cocoa/html_dialog_window_controller_unittest.mm
index 761417a..0cd6164 100644
--- a/chrome/browser/ui/cocoa/html_dialog_window_controller_unittest.mm
+++ b/chrome/browser/ui/cocoa/html_dialog_window_controller_unittest.mm
@@ -1,4 +1,4 @@
-// Copyright (c) 2010 The Chromium Authors. All rights reserved.
+// 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.
@@ -11,7 +11,7 @@
#import "base/mac/scoped_nsautorelease_pool.h"
#include "base/sys_string_conversions.h"
-#include "chrome/browser/dom_ui/dom_ui.h"
+#include "chrome/browser/dom_ui/web_ui.h"
#include "chrome/browser/dom_ui/html_dialog_ui.h"
#include "chrome/browser/ui/browser.h"
#include "chrome/browser/ui/cocoa/cocoa_test_helper.h"
diff --git a/chrome/browser/ui/views/textfield_views.cc b/chrome/browser/ui/views/textfield_views.cc
index 7d28fc3..cf57a0d 100644
--- a/chrome/browser/ui/views/textfield_views.cc
+++ b/chrome/browser/ui/views/textfield_views.cc
@@ -12,12 +12,12 @@
TextfieldViews::TextfieldViews() : DOMView() {}
std::wstring TextfieldViews::GetText() {
- TextfieldsUI* textfields_ui = dom_ui();
+ TextfieldsUI* textfields_ui = web_ui();
return (textfields_ui) ? textfields_ui->text() : std::wstring();
}
void TextfieldViews::SetText(const std::wstring& text) {
- TextfieldsUI* textfields_ui = dom_ui();
+ TextfieldsUI* textfields_ui = web_ui();
if (textfields_ui) {
StringValue text_value(WideToUTF16(text));
textfields_ui->CallJavascriptFunction(L"setTextfieldValue", text_value);
@@ -25,10 +25,10 @@ void TextfieldViews::SetText(const std::wstring& text) {
SchedulePaint();
}
-TextfieldsUI* TextfieldViews::dom_ui() {
- TextfieldsUI* dom_ui = NULL;
- if (tab_contents_.get() && tab_contents_->dom_ui()) {
- dom_ui = static_cast<TextfieldsUI*>(tab_contents_->dom_ui());
+TextfieldsUI* TextfieldViews::web_ui() {
+ TextfieldsUI* web_ui = NULL;
+ if (tab_contents_.get() && tab_contents_->web_ui()) {
+ web_ui = static_cast<TextfieldsUI*>(tab_contents_->web_ui());
}
- return dom_ui;
+ return web_ui;
}
diff --git a/chrome/browser/ui/views/textfield_views.h b/chrome/browser/ui/views/textfield_views.h
index d605006..16ce10b 100644
--- a/chrome/browser/ui/views/textfield_views.h
+++ b/chrome/browser/ui/views/textfield_views.h
@@ -19,7 +19,7 @@ class TextfieldViews : public DOMView {
void SetText(const std::wstring& text);
private:
- TextfieldsUI* dom_ui();
+ TextfieldsUI* web_ui();
DISALLOW_COPY_AND_ASSIGN(TextfieldViews);
};
diff --git a/chrome/chrome_browser.gypi b/chrome/chrome_browser.gypi
index 4538a67..8d796bc 100644
--- a/chrome/chrome_browser.gypi
+++ b/chrome/chrome_browser.gypi
@@ -859,8 +859,6 @@
'browser/dom_ui/constrained_html_ui.h',
'browser/dom_ui/devtools_ui.cc',
'browser/dom_ui/devtools_ui.h',
- 'browser/dom_ui/dom_ui.cc',
- 'browser/dom_ui/dom_ui.h',
'browser/dom_ui/downloads_dom_handler.cc',
'browser/dom_ui/downloads_dom_handler.h',
'browser/dom_ui/downloads_ui.cc',
@@ -977,6 +975,8 @@
'browser/dom_ui/tips_handler.h',
'browser/dom_ui/value_helper.cc',
'browser/dom_ui/value_helper.h',
+ 'browser/dom_ui/web_ui.cc',
+ 'browser/dom_ui/web_ui.h',
'browser/dom_ui/web_ui_factory.cc',
'browser/dom_ui/web_ui_factory.h',
'browser/dom_ui/web_ui_favicon_source.cc',