summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authortfarina@chromium.org <tfarina@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-05-22 23:53:07 +0000
committertfarina@chromium.org <tfarina@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-05-22 23:53:07 +0000
commit82194b5fba6a05d0723146e55b33863cf220b684 (patch)
treeba808557bea77a0178af55a9a112b0c8e6938f6d
parentc0b4b9415127099a321c8bdfd633a2e336cd8504 (diff)
downloadchromium_src-82194b5fba6a05d0723146e55b33863cf220b684.zip
chromium_src-82194b5fba6a05d0723146e55b33863cf220b684.tar.gz
chromium_src-82194b5fba6a05d0723146e55b33863cf220b684.tar.bz2
browser: Rename message_box_handler.* to javascript_dialog_creator.*
So the filename matches much more with the free function names used in the header file and with the class name used in the source file. R=ben@chromium.org Review URL: https://chromiumcodereview.appspot.com/10389228 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@138398 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r--chrome/browser/extensions/extension_host.cc2
-rw-r--r--chrome/browser/external_tab/external_tab_container_win.cc2
-rw-r--r--chrome/browser/ui/app_modal_dialogs/javascript_dialog_creator.cc (renamed from chrome/browser/ui/app_modal_dialogs/message_box_handler.cc)38
-rw-r--r--chrome/browser/ui/app_modal_dialogs/javascript_dialog_creator.h (renamed from chrome/browser/ui/app_modal_dialogs/message_box_handler.h)6
-rw-r--r--chrome/browser/ui/browser.cc2
-rw-r--r--chrome/browser/ui/gtk/tabs/dragged_tab_controller_gtk.cc2
-rw-r--r--chrome/browser/ui/views/tabs/tab_drag_controller.cc2
-rw-r--r--chrome/chrome_browser.gypi4
8 files changed, 29 insertions, 29 deletions
diff --git a/chrome/browser/extensions/extension_host.cc b/chrome/browser/extensions/extension_host.cc
index ff721c6..a4d8993 100644
--- a/chrome/browser/extensions/extension_host.cc
+++ b/chrome/browser/extensions/extension_host.cc
@@ -22,7 +22,7 @@
#include "chrome/browser/extensions/extension_window_controller.h"
#include "chrome/browser/file_select_helper.h"
#include "chrome/browser/profiles/profile.h"
-#include "chrome/browser/ui/app_modal_dialogs/message_box_handler.h"
+#include "chrome/browser/ui/app_modal_dialogs/javascript_dialog_creator.h"
#include "chrome/browser/ui/browser.h"
#include "chrome/browser/ui/browser_finder.h"
#include "chrome/browser/ui/browser_list.h"
diff --git a/chrome/browser/external_tab/external_tab_container_win.cc b/chrome/browser/external_tab/external_tab_container_win.cc
index 844cd05..4cb512d 100644
--- a/chrome/browser/external_tab/external_tab_container_win.cc
+++ b/chrome/browser/external_tab/external_tab_container_win.cc
@@ -27,7 +27,7 @@
#include "chrome/browser/profiles/profile.h"
#include "chrome/browser/repost_form_warning_controller.h"
#include "chrome/browser/themes/theme_service.h"
-#include "chrome/browser/ui/app_modal_dialogs/message_box_handler.h"
+#include "chrome/browser/ui/app_modal_dialogs/javascript_dialog_creator.h"
#include "chrome/browser/ui/blocked_content/blocked_content_tab_helper.h"
#include "chrome/browser/ui/browser.h"
#include "chrome/browser/ui/browser_dialogs.h"
diff --git a/chrome/browser/ui/app_modal_dialogs/message_box_handler.cc b/chrome/browser/ui/app_modal_dialogs/javascript_dialog_creator.cc
index 1f7e2fb..7f8311c 100644
--- a/chrome/browser/ui/app_modal_dialogs/message_box_handler.cc
+++ b/chrome/browser/ui/app_modal_dialogs/javascript_dialog_creator.cc
@@ -2,14 +2,14 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#include "chrome/browser/ui/app_modal_dialogs/message_box_handler.h"
+#include "chrome/browser/ui/app_modal_dialogs/javascript_dialog_creator.h"
#include <map>
#include "base/compiler_specific.h"
+#include "base/i18n/rtl.h"
#include "base/memory/singleton.h"
#include "base/utf_string_conversions.h"
-#include "base/i18n/rtl.h"
#include "chrome/browser/extensions/extension_host.h"
#include "chrome/browser/extensions/extension_service.h"
#include "chrome/browser/ui/app_modal_dialogs/app_modal_dialog_queue.h"
@@ -28,9 +28,10 @@
using content::JavaScriptDialogCreator;
using content::WebContents;
-class ChromeJavaScriptDialogCreator
- : public JavaScriptDialogCreator,
- public content::NotificationObserver {
+namespace {
+
+class ChromeJavaScriptDialogCreator : public JavaScriptDialogCreator,
+ public content::NotificationObserver {
public:
static ChromeJavaScriptDialogCreator* GetInstance();
@@ -56,11 +57,11 @@ class ChromeJavaScriptDialogCreator
virtual void ResetJavaScriptState(WebContents* web_contents) OVERRIDE;
private:
- explicit ChromeJavaScriptDialogCreator();
+ ChromeJavaScriptDialogCreator();
friend struct DefaultSingletonTraits<ChromeJavaScriptDialogCreator>;
- // content::NotificationObserver
+ // Overridden from content::NotificationObserver:
virtual void Observe(int type,
const content::NotificationSource& source,
const content::NotificationDetails& details) OVERRIDE;
@@ -93,7 +94,8 @@ class ChromeJavaScriptDialogCreator
DISALLOW_COPY_AND_ASSIGN(ChromeJavaScriptDialogCreator);
};
-//------------------------------------------------------------------------------
+////////////////////////////////////////////////////////////////////////////////
+// ChromeJavaScriptDialogCreator, public:
ChromeJavaScriptDialogCreator::ChromeJavaScriptDialogCreator()
: extension_host_(NULL) {
@@ -110,7 +112,7 @@ ChromeJavaScriptDialogCreator::ChromeJavaScriptDialogCreator(
content::Source<Profile>(extension_host_->profile()));
}
-/* static */
+// static
ChromeJavaScriptDialogCreator* ChromeJavaScriptDialogCreator::GetInstance() {
return Singleton<ChromeJavaScriptDialogCreator>::get();
}
@@ -173,14 +175,10 @@ void ChromeJavaScriptDialogCreator::RunBeforeUnloadDialog(
ChromeJavaScriptDialogExtraData* extra_data =
&javascript_dialog_extra_data_[web_contents];
- string16 title = l10n_util::GetStringUTF16(
- is_reload ?
- IDS_BEFORERELOAD_MESSAGEBOX_TITLE :
- IDS_BEFOREUNLOAD_MESSAGEBOX_TITLE);
- string16 footer = l10n_util::GetStringUTF16(
- is_reload ?
- IDS_BEFORERELOAD_MESSAGEBOX_FOOTER :
- IDS_BEFOREUNLOAD_MESSAGEBOX_FOOTER);
+ const string16 title = l10n_util::GetStringUTF16(is_reload ?
+ IDS_BEFORERELOAD_MESSAGEBOX_TITLE : IDS_BEFOREUNLOAD_MESSAGEBOX_TITLE);
+ const string16 footer = l10n_util::GetStringUTF16(is_reload ?
+ IDS_BEFORERELOAD_MESSAGEBOX_FOOTER : IDS_BEFOREUNLOAD_MESSAGEBOX_FOOTER);
string16 full_message = message_text + ASCIIToUTF16("\n\n") + footer;
@@ -258,13 +256,15 @@ void ChromeJavaScriptDialogCreator::CancelPendingDialogs(
}
void ChromeJavaScriptDialogCreator::OnDialogClosed(
- DialogClosedCallback callback, bool success, const string16& user_input) {
+ DialogClosedCallback callback,
+ bool success,
+ const string16& user_input) {
if (extension_host_)
extension_host_->DidCloseJavaScriptDialog();
callback.Run(success, user_input);
}
-//------------------------------------------------------------------------------
+} // namespace
content::JavaScriptDialogCreator* GetJavaScriptDialogCreatorInstance() {
return ChromeJavaScriptDialogCreator::GetInstance();
diff --git a/chrome/browser/ui/app_modal_dialogs/message_box_handler.h b/chrome/browser/ui/app_modal_dialogs/javascript_dialog_creator.h
index a13ac5c..5fcebe6 100644
--- a/chrome/browser/ui/app_modal_dialogs/message_box_handler.h
+++ b/chrome/browser/ui/app_modal_dialogs/javascript_dialog_creator.h
@@ -2,8 +2,8 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#ifndef CHROME_BROWSER_UI_APP_MODAL_DIALOGS_MESSAGE_BOX_HANDLER_H_
-#define CHROME_BROWSER_UI_APP_MODAL_DIALOGS_MESSAGE_BOX_HANDLER_H_
+#ifndef CHROME_BROWSER_UI_APP_MODAL_DIALOGS_JAVASCRIPT_DIALOG_CREATOR_H_
+#define CHROME_BROWSER_UI_APP_MODAL_DIALOGS_JAVASCRIPT_DIALOG_CREATOR_H_
#pragma once
namespace content {
@@ -22,4 +22,4 @@ content::JavaScriptDialogCreator* GetJavaScriptDialogCreatorInstance();
content::JavaScriptDialogCreator* CreateJavaScriptDialogCreatorInstance(
ExtensionHost* extension_host);
-#endif // CHROME_BROWSER_UI_APP_MODAL_DIALOGS_MESSAGE_BOX_HANDLER_H_
+#endif // CHROME_BROWSER_UI_APP_MODAL_DIALOGS_JAVASCRIPT_DIALOG_CREATOR_H_
diff --git a/chrome/browser/ui/browser.cc b/chrome/browser/ui/browser.cc
index 0e3ae93..9e2ad55 100644
--- a/chrome/browser/ui/browser.cc
+++ b/chrome/browser/ui/browser.cc
@@ -98,7 +98,7 @@
#include "chrome/browser/tab_contents/tab_util.h"
#include "chrome/browser/themes/theme_service.h"
#include "chrome/browser/themes/theme_service_factory.h"
-#include "chrome/browser/ui/app_modal_dialogs/message_box_handler.h"
+#include "chrome/browser/ui/app_modal_dialogs/javascript_dialog_creator.h"
#include "chrome/browser/ui/blocked_content/blocked_content_tab_helper.h"
#include "chrome/browser/ui/bookmarks/bookmark_tab_helper.h"
#include "chrome/browser/ui/browser_content_setting_bubble_model_delegate.h"
diff --git a/chrome/browser/ui/gtk/tabs/dragged_tab_controller_gtk.cc b/chrome/browser/ui/gtk/tabs/dragged_tab_controller_gtk.cc
index b36a785..6289679 100644
--- a/chrome/browser/ui/gtk/tabs/dragged_tab_controller_gtk.cc
+++ b/chrome/browser/ui/gtk/tabs/dragged_tab_controller_gtk.cc
@@ -10,7 +10,7 @@
#include "base/bind_helpers.h"
#include "base/i18n/rtl.h"
#include "chrome/browser/platform_util.h"
-#include "chrome/browser/ui/app_modal_dialogs/message_box_handler.h"
+#include "chrome/browser/ui/app_modal_dialogs/javascript_dialog_creator.h"
#include "chrome/browser/ui/browser.h"
#include "chrome/browser/ui/gtk/browser_window_gtk.h"
#include "chrome/browser/ui/gtk/gtk_util.h"
diff --git a/chrome/browser/ui/views/tabs/tab_drag_controller.cc b/chrome/browser/ui/views/tabs/tab_drag_controller.cc
index 5579eac..4b06ea6b 100644
--- a/chrome/browser/ui/views/tabs/tab_drag_controller.cc
+++ b/chrome/browser/ui/views/tabs/tab_drag_controller.cc
@@ -11,7 +11,7 @@
#include "base/command_line.h"
#include "base/i18n/rtl.h"
#include "chrome/browser/extensions/extension_function_dispatcher.h"
-#include "chrome/browser/ui/app_modal_dialogs/message_box_handler.h"
+#include "chrome/browser/ui/app_modal_dialogs/javascript_dialog_creator.h"
#include "chrome/browser/ui/browser_window.h"
#include "chrome/browser/ui/tabs/tab_strip_model.h"
#include "chrome/browser/ui/views/frame/browser_view.h"
diff --git a/chrome/chrome_browser.gypi b/chrome/chrome_browser.gypi
index 1af3c79..30a6ab9 100644
--- a/chrome/chrome_browser.gypi
+++ b/chrome/chrome_browser.gypi
@@ -2286,8 +2286,8 @@
'browser/ui/app_modal_dialogs/app_modal_dialog_queue.h',
'browser/ui/app_modal_dialogs/js_modal_dialog.cc',
'browser/ui/app_modal_dialogs/js_modal_dialog.h',
- 'browser/ui/app_modal_dialogs/message_box_handler.cc',
- 'browser/ui/app_modal_dialogs/message_box_handler.h',
+ 'browser/ui/app_modal_dialogs/javascript_dialog_creator.cc',
+ 'browser/ui/app_modal_dialogs/javascript_dialog_creator.h',
'browser/ui/app_modal_dialogs/native_app_modal_dialog.h',
'browser/ui/auto_login_info_bar_delegate.cc',
'browser/ui/auto_login_info_bar_delegate.h',