summaryrefslogtreecommitdiffstats
path: root/chrome/browser
diff options
context:
space:
mode:
authortfarina@chromium.org <tfarina@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-03-03 00:32:21 +0000
committertfarina@chromium.org <tfarina@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-03-03 00:32:21 +0000
commit7cceebac61d267d113791de09d79ac11f4fa95f3 (patch)
treedc566f4d2ac729ece62f907b1e10bf43395ba878 /chrome/browser
parent31dddf0385657b784cd34c2617f4f993c56fa96e (diff)
downloadchromium_src-7cceebac61d267d113791de09d79ac11f4fa95f3.zip
chromium_src-7cceebac61d267d113791de09d79ac11f4fa95f3.tar.gz
chromium_src-7cceebac61d267d113791de09d79ac11f4fa95f3.tar.bz2
Split infobar_delegate.[cc,h] into separate pieces for the different classes defined within, so that each piece is shorter and clearer.
BUG=None TEST=None Review URL: http://codereview.chromium.org/6598057 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@76677 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser')
-rw-r--r--chrome/browser/alternate_nav_url_fetcher.h2
-rw-r--r--chrome/browser/autofill/autofill_cc_infobar_delegate.h2
-rw-r--r--chrome/browser/automation/testing_automation_provider.cc11
-rw-r--r--chrome/browser/custom_handlers/register_protocol_handler_infobar_delegate.h2
-rw-r--r--chrome/browser/download/download_request_infobar_delegate.h2
-rw-r--r--chrome/browser/extensions/crashed_extension_infobar.h2
-rw-r--r--chrome/browser/extensions/extension_crash_recovery_browsertest.cc2
-rw-r--r--chrome/browser/extensions/extension_disabled_infobar_delegate.cc4
-rw-r--r--chrome/browser/extensions/extension_infobar_delegate.h2
-rw-r--r--chrome/browser/extensions/extension_infobar_module.cc8
-rw-r--r--chrome/browser/extensions/theme_installed_infobar_delegate.h2
-rw-r--r--chrome/browser/geolocation/geolocation_browsertest.cc2
-rw-r--r--chrome/browser/geolocation/geolocation_permission_context.cc2
-rw-r--r--chrome/browser/geolocation/geolocation_permission_context_unittest.cc2
-rw-r--r--chrome/browser/google/google_url_tracker.h2
-rw-r--r--chrome/browser/google/google_url_tracker_unittest.cc2
-rw-r--r--chrome/browser/notifications/desktop_notification_service.cc2
-rw-r--r--chrome/browser/omnibox_search_hint.cc2
-rw-r--r--chrome/browser/password_manager_delegate_impl.cc2
-rw-r--r--chrome/browser/pdf_unsupported_feature.cc2
-rw-r--r--chrome/browser/plugin_installer_infobar_delegate.h2
-rw-r--r--chrome/browser/plugin_observer.cc3
-rw-r--r--chrome/browser/tab_contents/confirm_infobar_delegate.cc55
-rw-r--r--chrome/browser/tab_contents/confirm_infobar_delegate.h70
-rw-r--r--chrome/browser/tab_contents/infobar_delegate.cc117
-rw-r--r--chrome/browser/tab_contents/infobar_delegate.h124
-rw-r--r--chrome/browser/tab_contents/link_infobar_delegate.cc22
-rw-r--r--chrome/browser/tab_contents/link_infobar_delegate.h46
-rw-r--r--chrome/browser/tab_contents/simple_alert_infobar_delegate.cc44
-rw-r--r--chrome/browser/tab_contents/simple_alert_infobar_delegate.h42
-rw-r--r--chrome/browser/tab_contents/tab_contents_ssl_helper.cc3
-rw-r--r--chrome/browser/task_manager/task_manager_browsertest.cc2
-rw-r--r--chrome/browser/translate/translate_infobar_delegate.h2
-rw-r--r--chrome/browser/ui/browser.cc2
-rw-r--r--chrome/browser/ui/browser_init.cc3
-rw-r--r--chrome/browser/ui/cocoa/extensions/extension_installed_bubble_bridge.mm7
-rw-r--r--chrome/browser/ui/cocoa/infobars/infobar.h4
-rw-r--r--chrome/browser/ui/cocoa/infobars/infobar_container_controller.mm2
-rw-r--r--chrome/browser/ui/cocoa/infobars/infobar_controller.mm3
-rw-r--r--chrome/browser/ui/cocoa/infobars/infobar_controller_unittest.mm2
-rw-r--r--chrome/browser/ui/cocoa/infobars/infobar_test_helper.h4
-rw-r--r--chrome/browser/ui/cocoa/keystone_infobar.mm2
-rw-r--r--chrome/browser/ui/gtk/infobars/confirm_infobar_gtk.h1
-rw-r--r--chrome/browser/ui/gtk/infobars/infobar_container_gtk.cc2
-rw-r--r--chrome/browser/ui/gtk/infobars/infobar_gtk.h2
-rw-r--r--chrome/browser/ui/gtk/infobars/link_infobar_gtk.cc2
-rw-r--r--chrome/browser/ui/tab_contents/tab_contents_wrapper.cc4
-rw-r--r--chrome/browser/ui/views/infobars/confirm_infobar.cc2
-rw-r--r--chrome/browser/ui/views/infobars/infobar_background.h2
-rw-r--r--chrome/browser/ui/views/infobars/infobar_container.cc2
-rw-r--r--chrome/browser/ui/views/infobars/infobar_view.cc4
-rw-r--r--chrome/browser/ui/views/infobars/link_infobar.cc2
52 files changed, 343 insertions, 298 deletions
diff --git a/chrome/browser/alternate_nav_url_fetcher.h b/chrome/browser/alternate_nav_url_fetcher.h
index 0dbcfb8..05fa6f9 100644
--- a/chrome/browser/alternate_nav_url_fetcher.h
+++ b/chrome/browser/alternate_nav_url_fetcher.h
@@ -8,7 +8,7 @@
#include <string>
-#include "chrome/browser/tab_contents/infobar_delegate.h"
+#include "chrome/browser/tab_contents/link_infobar_delegate.h"
#include "chrome/common/net/url_fetcher.h"
#include "chrome/common/notification_observer.h"
#include "chrome/common/notification_registrar.h"
diff --git a/chrome/browser/autofill/autofill_cc_infobar_delegate.h b/chrome/browser/autofill/autofill_cc_infobar_delegate.h
index 9b040c1..1f9ee67 100644
--- a/chrome/browser/autofill/autofill_cc_infobar_delegate.h
+++ b/chrome/browser/autofill/autofill_cc_infobar_delegate.h
@@ -7,7 +7,7 @@
#pragma once
#include "base/string16.h"
-#include "chrome/browser/tab_contents/infobar_delegate.h"
+#include "chrome/browser/tab_contents/confirm_infobar_delegate.h"
class AutoFillManager;
diff --git a/chrome/browser/automation/testing_automation_provider.cc b/chrome/browser/automation/testing_automation_provider.cc
index 9c15ec5..6c61b3e 100644
--- a/chrome/browser/automation/testing_automation_provider.cc
+++ b/chrome/browser/automation/testing_automation_provider.cc
@@ -32,9 +32,9 @@
#include "chrome/browser/automation/automation_tab_tracker.h"
#include "chrome/browser/automation/automation_window_tracker.h"
#include "chrome/browser/automation/ui_controls.h"
+#include "chrome/browser/blocked_content_container.h"
#include "chrome/browser/bookmarks/bookmark_model.h"
#include "chrome/browser/bookmarks/bookmark_storage.h"
-#include "chrome/browser/blocked_content_container.h"
#include "chrome/browser/browser_process.h"
#include "chrome/browser/browser_shutdown.h"
#include "chrome/browser/browser_window.h"
@@ -43,20 +43,21 @@
#include "chrome/browser/download/download_shelf.h"
#include "chrome/browser/extensions/extension_host.h"
#include "chrome/browser/extensions/extension_service.h"
-#include "chrome/browser/instant/instant_controller.h"
#include "chrome/browser/history/top_sites.h"
#include "chrome/browser/importer/importer.h"
+#include "chrome/browser/instant/instant_controller.h"
#include "chrome/browser/notifications/balloon.h"
#include "chrome/browser/notifications/balloon_collection.h"
#include "chrome/browser/notifications/notification.h"
#include "chrome/browser/notifications/notification_ui_manager.h"
-#include "chrome/browser/profiles/profile.h"
#include "chrome/browser/platform_util.h"
#include "chrome/browser/prefs/pref_service.h"
+#include "chrome/browser/profiles/profile.h"
#include "chrome/browser/profiles/profile_manager.h"
#include "chrome/browser/search_engines/template_url.h"
#include "chrome/browser/search_engines/template_url_model.h"
-#include "chrome/browser/tab_contents/infobar_delegate.h"
+#include "chrome/browser/tab_contents/confirm_infobar_delegate.h"
+#include "chrome/browser/tab_contents/link_infobar_delegate.h"
#include "chrome/browser/translate/translate_infobar_delegate.h"
#include "chrome/browser/ui/app_modal_dialogs/app_modal_dialog.h"
#include "chrome/browser/ui/app_modal_dialogs/app_modal_dialog_queue.h"
@@ -66,13 +67,13 @@
#include "chrome/browser/ui/omnibox/location_bar.h"
#include "chrome/browser/ui/search_engines/keyword_editor_controller.h"
#include "chrome/browser/ui/tab_contents/tab_contents_wrapper.h"
+#include "chrome/common/automation_messages.h"
#include "chrome/common/chrome_constants.h"
#include "chrome/common/chrome_paths.h"
#include "chrome/common/chrome_switches.h"
#include "chrome/common/net/url_request_context_getter.h"
#include "chrome/common/notification_service.h"
#include "chrome/common/url_constants.h"
-#include "chrome/common/automation_messages.h"
#include "content/browser/renderer_host/render_process_host.h"
#include "content/browser/renderer_host/render_view_host.h"
#include "content/browser/tab_contents/interstitial_page.h"
diff --git a/chrome/browser/custom_handlers/register_protocol_handler_infobar_delegate.h b/chrome/browser/custom_handlers/register_protocol_handler_infobar_delegate.h
index 3880ee9..ba6b7aa 100644
--- a/chrome/browser/custom_handlers/register_protocol_handler_infobar_delegate.h
+++ b/chrome/browser/custom_handlers/register_protocol_handler_infobar_delegate.h
@@ -7,7 +7,7 @@
#pragma once
#include "base/string16.h"
-#include "chrome/browser/tab_contents/infobar_delegate.h"
+#include "chrome/browser/tab_contents/confirm_infobar_delegate.h"
class SkBitmap;
class ProtocolHandler;
diff --git a/chrome/browser/download/download_request_infobar_delegate.h b/chrome/browser/download/download_request_infobar_delegate.h
index 16d3f4b..aa5a789 100644
--- a/chrome/browser/download/download_request_infobar_delegate.h
+++ b/chrome/browser/download/download_request_infobar_delegate.h
@@ -8,7 +8,7 @@
#include "base/basictypes.h"
#include "chrome/browser/download/download_request_limiter.h"
-#include "chrome/browser/tab_contents/infobar_delegate.h"
+#include "chrome/browser/tab_contents/confirm_infobar_delegate.h"
class TabContents;
diff --git a/chrome/browser/extensions/crashed_extension_infobar.h b/chrome/browser/extensions/crashed_extension_infobar.h
index d4d08a7..d6ec360 100644
--- a/chrome/browser/extensions/crashed_extension_infobar.h
+++ b/chrome/browser/extensions/crashed_extension_infobar.h
@@ -9,7 +9,7 @@
#include <string>
#include "base/basictypes.h"
-#include "chrome/browser/tab_contents/infobar_delegate.h"
+#include "chrome/browser/tab_contents/confirm_infobar_delegate.h"
class Extension;
class ExtensionService;
diff --git a/chrome/browser/extensions/extension_crash_recovery_browsertest.cc b/chrome/browser/extensions/extension_crash_recovery_browsertest.cc
index 9e3f3ac..9e9328f 100644
--- a/chrome/browser/extensions/extension_crash_recovery_browsertest.cc
+++ b/chrome/browser/extensions/extension_crash_recovery_browsertest.cc
@@ -9,7 +9,7 @@
#include "chrome/browser/extensions/extension_process_manager.h"
#include "chrome/browser/extensions/extension_service.h"
#include "chrome/browser/profiles/profile.h"
-#include "chrome/browser/tab_contents/infobar_delegate.h"
+#include "chrome/browser/tab_contents/confirm_infobar_delegate.h"
#include "chrome/browser/tabs/tab_strip_model.h"
#include "chrome/browser/ui/browser.h"
#include "chrome/common/result_codes.h"
diff --git a/chrome/browser/extensions/extension_disabled_infobar_delegate.cc b/chrome/browser/extensions/extension_disabled_infobar_delegate.cc
index 7834199..8b20878 100644
--- a/chrome/browser/extensions/extension_disabled_infobar_delegate.cc
+++ b/chrome/browser/extensions/extension_disabled_infobar_delegate.cc
@@ -7,10 +7,10 @@
#include <string>
#include "base/utf_string_conversions.h"
+#include "chrome/browser/browser_list.h"
#include "chrome/browser/extensions/extension_install_ui.h"
#include "chrome/browser/extensions/extension_service.h"
-#include "chrome/browser/tab_contents/infobar_delegate.h"
-#include "chrome/browser/browser_list.h"
+#include "chrome/browser/tab_contents/confirm_infobar_delegate.h"
#include "chrome/common/extensions/extension_file_util.h"
#include "chrome/common/extensions/extension_resource.h"
#include "chrome/common/notification_details.h"
diff --git a/chrome/browser/extensions/extension_infobar_delegate.h b/chrome/browser/extensions/extension_infobar_delegate.h
index 95f73aa..884056e 100644
--- a/chrome/browser/extensions/extension_infobar_delegate.h
+++ b/chrome/browser/extensions/extension_infobar_delegate.h
@@ -6,7 +6,7 @@
#define CHROME_BROWSER_EXTENSIONS_EXTENSION_INFOBAR_DELEGATE_H_
#pragma once
-#include "chrome/browser/tab_contents/infobar_delegate.h"
+#include "chrome/browser/tab_contents/confirm_infobar_delegate.h"
class Browser;
class Extension;
diff --git a/chrome/browser/extensions/extension_infobar_module.cc b/chrome/browser/extensions/extension_infobar_module.cc
index ff07de7..e775331d 100644
--- a/chrome/browser/extensions/extension_infobar_module.cc
+++ b/chrome/browser/extensions/extension_infobar_module.cc
@@ -1,18 +1,18 @@
-// 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/extensions/extension_infobar_module.h"
-#include "base/string_util.h"
#include "base/string_number_conversions.h"
+#include "base/string_util.h"
#include "base/values.h"
#include "chrome/browser/extensions/extension_host.h"
-#include "chrome/browser/extensions/extension_infobar_module_constants.h"
#include "chrome/browser/extensions/extension_infobar_delegate.h"
+#include "chrome/browser/extensions/extension_infobar_module_constants.h"
#include "chrome/browser/extensions/extension_tabs_module.h"
#include "chrome/browser/extensions/extension_tabs_module_constants.h"
-#include "chrome/browser/tab_contents/infobar_delegate.h"
+#include "chrome/browser/tab_contents/confirm_infobar_delegate.h"
#include "chrome/browser/ui/browser.h"
#include "chrome/browser/ui/tab_contents/tab_contents_wrapper.h"
#include "chrome/common/extensions/extension.h"
diff --git a/chrome/browser/extensions/theme_installed_infobar_delegate.h b/chrome/browser/extensions/theme_installed_infobar_delegate.h
index c565a33..0eb0d3d 100644
--- a/chrome/browser/extensions/theme_installed_infobar_delegate.h
+++ b/chrome/browser/extensions/theme_installed_infobar_delegate.h
@@ -6,7 +6,7 @@
#define CHROME_BROWSER_EXTENSIONS_THEME_INSTALLED_INFOBAR_DELEGATE_H_
#pragma once
-#include "chrome/browser/tab_contents/infobar_delegate.h"
+#include "chrome/browser/tab_contents/confirm_infobar_delegate.h"
#include "chrome/common/notification_registrar.h"
class Extension;
diff --git a/chrome/browser/geolocation/geolocation_browsertest.cc b/chrome/browser/geolocation/geolocation_browsertest.cc
index b4435ea..4e831c2 100644
--- a/chrome/browser/geolocation/geolocation_browsertest.cc
+++ b/chrome/browser/geolocation/geolocation_browsertest.cc
@@ -11,7 +11,7 @@
#include "chrome/browser/geolocation/geolocation_content_settings_map.h"
#include "chrome/browser/geolocation/geolocation_settings_state.h"
#include "chrome/browser/profiles/profile.h"
-#include "chrome/browser/tab_contents/infobar_delegate.h"
+#include "chrome/browser/tab_contents/confirm_infobar_delegate.h"
#include "chrome/browser/ui/browser.h"
#include "chrome/common/chrome_paths.h"
#include "chrome/common/geoposition.h"
diff --git a/chrome/browser/geolocation/geolocation_permission_context.cc b/chrome/browser/geolocation/geolocation_permission_context.cc
index 7bef383..d98841f 100644
--- a/chrome/browser/geolocation/geolocation_permission_context.cc
+++ b/chrome/browser/geolocation/geolocation_permission_context.cc
@@ -14,7 +14,7 @@
#include "chrome/browser/google/google_util.h"
#include "chrome/browser/prefs/pref_service.h"
#include "chrome/browser/profiles/profile.h"
-#include "chrome/browser/tab_contents/infobar_delegate.h"
+#include "chrome/browser/tab_contents/confirm_infobar_delegate.h"
#include "chrome/browser/tab_contents/tab_util.h"
#include "chrome/common/extensions/extension.h"
#include "chrome/common/notification_registrar.h"
diff --git a/chrome/browser/geolocation/geolocation_permission_context_unittest.cc b/chrome/browser/geolocation/geolocation_permission_context_unittest.cc
index a4cf8da..d96cb7f 100644
--- a/chrome/browser/geolocation/geolocation_permission_context_unittest.cc
+++ b/chrome/browser/geolocation/geolocation_permission_context_unittest.cc
@@ -4,7 +4,7 @@
#include "base/scoped_vector.h"
#include "chrome/browser/geolocation/geolocation_content_settings_map.h"
-#include "chrome/browser/tab_contents/infobar_delegate.h"
+#include "chrome/browser/tab_contents/confirm_infobar_delegate.h"
#include "chrome/common/notification_details.h"
#include "chrome/common/notification_type.h"
#include "chrome/common/render_messages.h"
diff --git a/chrome/browser/google/google_url_tracker.h b/chrome/browser/google/google_url_tracker.h
index 5edc75a..0c405dd 100644
--- a/chrome/browser/google/google_url_tracker.h
+++ b/chrome/browser/google/google_url_tracker.h
@@ -10,7 +10,7 @@
#include "base/gtest_prod_util.h"
#include "base/scoped_ptr.h"
-#include "chrome/browser/tab_contents/infobar_delegate.h"
+#include "chrome/browser/tab_contents/confirm_infobar_delegate.h"
#include "chrome/common/net/url_fetcher.h"
#include "chrome/common/notification_observer.h"
#include "chrome/common/notification_registrar.h"
diff --git a/chrome/browser/google/google_url_tracker_unittest.cc b/chrome/browser/google/google_url_tracker_unittest.cc
index 0e05229..1da9fa6 100644
--- a/chrome/browser/google/google_url_tracker_unittest.cc
+++ b/chrome/browser/google/google_url_tracker_unittest.cc
@@ -9,7 +9,7 @@
#include "chrome/browser/browser_process.h"
#include "chrome/browser/prefs/browser_prefs.h"
#include "chrome/browser/profiles/profile.h"
-#include "chrome/browser/tab_contents/infobar_delegate.h"
+#include "chrome/browser/tab_contents/confirm_infobar_delegate.h"
#include "chrome/common/net/test_url_fetcher_factory.h"
#include "chrome/common/net/url_fetcher.h"
#include "chrome/common/net/url_request_context_getter.h"
diff --git a/chrome/browser/notifications/desktop_notification_service.cc b/chrome/browser/notifications/desktop_notification_service.cc
index 70f1341..243806e3 100644
--- a/chrome/browser/notifications/desktop_notification_service.cc
+++ b/chrome/browser/notifications/desktop_notification_service.cc
@@ -15,7 +15,7 @@
#include "chrome/browser/prefs/pref_service.h"
#include "chrome/browser/prefs/scoped_pref_update.h"
#include "chrome/browser/profiles/profile.h"
-#include "chrome/browser/tab_contents/infobar_delegate.h"
+#include "chrome/browser/tab_contents/confirm_infobar_delegate.h"
#include "chrome/common/notification_service.h"
#include "chrome/common/notification_type.h"
#include "chrome/common/pref_names.h"
diff --git a/chrome/browser/omnibox_search_hint.cc b/chrome/browser/omnibox_search_hint.cc
index e6adf4e..7fe0e60 100644
--- a/chrome/browser/omnibox_search_hint.cc
+++ b/chrome/browser/omnibox_search_hint.cc
@@ -19,7 +19,7 @@
#include "chrome/browser/profiles/profile.h"
#include "chrome/browser/search_engines/template_url.h"
#include "chrome/browser/search_engines/template_url_model.h"
-#include "chrome/browser/tab_contents/infobar_delegate.h"
+#include "chrome/browser/tab_contents/confirm_infobar_delegate.h"
#include "chrome/browser/ui/omnibox/location_bar.h"
#include "chrome/common/chrome_switches.h"
#include "chrome/common/notification_details.h"
diff --git a/chrome/browser/password_manager_delegate_impl.cc b/chrome/browser/password_manager_delegate_impl.cc
index 1369d99..286b73e 100644
--- a/chrome/browser/password_manager_delegate_impl.cc
+++ b/chrome/browser/password_manager_delegate_impl.cc
@@ -8,7 +8,7 @@
#include "base/singleton.h"
#include "chrome/browser/password_manager/password_form_manager.h"
#include "chrome/browser/password_manager/password_manager.h"
-#include "chrome/browser/tab_contents/infobar_delegate.h"
+#include "chrome/browser/tab_contents/confirm_infobar_delegate.h"
#include "chrome/common/autofill_messages.h"
#include "content/browser/renderer_host/render_view_host.h"
#include "content/browser/tab_contents/tab_contents.h"
diff --git a/chrome/browser/pdf_unsupported_feature.cc b/chrome/browser/pdf_unsupported_feature.cc
index d7e10f1..134031a 100644
--- a/chrome/browser/pdf_unsupported_feature.cc
+++ b/chrome/browser/pdf_unsupported_feature.cc
@@ -10,7 +10,7 @@
#include "chrome/browser/metrics/user_metrics.h"
#include "chrome/browser/prefs/pref_service.h"
#include "chrome/browser/profiles/profile.h"
-#include "chrome/browser/tab_contents/infobar_delegate.h"
+#include "chrome/browser/tab_contents/confirm_infobar_delegate.h"
#include "chrome/common/jstemplate_builder.h"
#include "chrome/common/pepper_plugin_registry.h"
#include "chrome/common/pref_names.h"
diff --git a/chrome/browser/plugin_installer_infobar_delegate.h b/chrome/browser/plugin_installer_infobar_delegate.h
index 631831b..66e1893 100644
--- a/chrome/browser/plugin_installer_infobar_delegate.h
+++ b/chrome/browser/plugin_installer_infobar_delegate.h
@@ -6,7 +6,7 @@
#define CHROME_BROWSER_PLUGIN_INSTALLER_INFOBAR_DELEGATE_H_
#pragma once
-#include "chrome/browser/tab_contents/infobar_delegate.h"
+#include "chrome/browser/tab_contents/confirm_infobar_delegate.h"
class TabContents;
diff --git a/chrome/browser/plugin_observer.cc b/chrome/browser/plugin_observer.cc
index 5eed631..1832b56 100644
--- a/chrome/browser/plugin_observer.cc
+++ b/chrome/browser/plugin_observer.cc
@@ -10,7 +10,8 @@
#include "chrome/browser/metrics/user_metrics.h"
#include "chrome/browser/plugin_installer_infobar_delegate.h"
#include "chrome/browser/profiles/profile.h"
-#include "chrome/browser/tab_contents/infobar_delegate.h"
+#include "chrome/browser/tab_contents/confirm_infobar_delegate.h"
+#include "chrome/browser/tab_contents/simple_alert_infobar_delegate.h"
#include "chrome/common/render_messages.h"
#include "chrome/common/url_constants.h"
#include "content/browser/renderer_host/render_view_host.h"
diff --git a/chrome/browser/tab_contents/confirm_infobar_delegate.cc b/chrome/browser/tab_contents/confirm_infobar_delegate.cc
new file mode 100644
index 0000000..21b3497
--- /dev/null
+++ b/chrome/browser/tab_contents/confirm_infobar_delegate.cc
@@ -0,0 +1,55 @@
+// 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/tab_contents/confirm_infobar_delegate.h"
+
+#include "content/browser/tab_contents/tab_contents.h"
+#include "grit/generated_resources.h"
+#include "ui/base/l10n/l10n_util.h"
+
+int ConfirmInfoBarDelegate::GetButtons() const {
+ return BUTTON_OK | BUTTON_CANCEL;
+}
+
+string16 ConfirmInfoBarDelegate::GetButtonLabel(InfoBarButton button) const {
+ return l10n_util::GetStringUTF16((button == BUTTON_OK) ? IDS_OK : IDS_CANCEL);
+}
+
+bool ConfirmInfoBarDelegate::NeedElevation(InfoBarButton button) const {
+ return false;
+}
+
+bool ConfirmInfoBarDelegate::Accept() {
+ return true;
+}
+
+bool ConfirmInfoBarDelegate::Cancel() {
+ return true;
+}
+
+string16 ConfirmInfoBarDelegate::GetLinkText() {
+ return string16();
+}
+
+bool ConfirmInfoBarDelegate::LinkClicked(WindowOpenDisposition disposition) {
+ return true;
+}
+
+ConfirmInfoBarDelegate::ConfirmInfoBarDelegate(TabContents* contents)
+ : InfoBarDelegate(contents) {
+}
+
+ConfirmInfoBarDelegate::~ConfirmInfoBarDelegate() {
+}
+
+bool ConfirmInfoBarDelegate::EqualsDelegate(InfoBarDelegate* delegate) const {
+ ConfirmInfoBarDelegate* confirm_delegate =
+ delegate->AsConfirmInfoBarDelegate();
+ return confirm_delegate &&
+ (confirm_delegate->GetMessageText() == GetMessageText());
+}
+
+ConfirmInfoBarDelegate* ConfirmInfoBarDelegate::AsConfirmInfoBarDelegate() {
+ return this;
+}
diff --git a/chrome/browser/tab_contents/confirm_infobar_delegate.h b/chrome/browser/tab_contents/confirm_infobar_delegate.h
new file mode 100644
index 0000000..a02f8c4
--- /dev/null
+++ b/chrome/browser/tab_contents/confirm_infobar_delegate.h
@@ -0,0 +1,70 @@
+// 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_TAB_CONTENTS_CONFIRM_INFOBAR_DELEGATE_H_
+#define CHROME_BROWSER_TAB_CONTENTS_CONFIRM_INFOBAR_DELEGATE_H_
+#pragma once
+
+#include "base/basictypes.h"
+#include "base/compiler_specific.h"
+#include "base/string16.h"
+#include "content/browser/tab_contents/infobar_delegate.h"
+
+// An interface derived from InfoBarDelegate implemented by objects wishing to
+// control a ConfirmInfoBar.
+class ConfirmInfoBarDelegate : public InfoBarDelegate {
+ public:
+ enum InfoBarButton {
+ BUTTON_NONE = 0,
+ BUTTON_OK = 1 << 0,
+ BUTTON_CANCEL = 1 << 1,
+ };
+
+ // Returns the message string to be displayed for the InfoBar.
+ virtual string16 GetMessageText() const = 0;
+
+ // Return the buttons to be shown for this InfoBar.
+ virtual int GetButtons() const;
+
+ // Return the label for the specified button. The default implementation
+ // returns "OK" for the OK button and "Cancel" for the Cancel button.
+ virtual string16 GetButtonLabel(InfoBarButton button) const;
+
+ // Return whether or not the specified button needs elevation.
+ virtual bool NeedElevation(InfoBarButton button) const;
+
+ // Called when the OK button is pressed. If the function returns true, the
+ // InfoBarDelegate should be removed from the associated TabContents.
+ virtual bool Accept();
+
+ // Called when the Cancel button is pressed. If the function returns true,
+ // the InfoBarDelegate should be removed from the associated TabContents.
+ virtual bool Cancel();
+
+ // Returns the text of the link to be displayed, if any. Otherwise returns
+ // and empty string.
+ virtual string16 GetLinkText();
+
+ // Called when the Link is clicked. The |disposition| specifies how the
+ // resulting document should be loaded (based on the event flags present when
+ // the link was clicked). This function returns true if the InfoBar should be
+ // closed now or false if it should remain until the user explicitly closes
+ // it.
+ // Will only be called if GetLinkText() returns non-empty string.
+ virtual bool LinkClicked(WindowOpenDisposition disposition);
+
+ protected:
+ explicit ConfirmInfoBarDelegate(TabContents* contents);
+ virtual ~ConfirmInfoBarDelegate();
+
+ private:
+ // InfoBarDelegate:
+ virtual InfoBar* CreateInfoBar() OVERRIDE;
+ virtual bool EqualsDelegate(InfoBarDelegate* delegate) const OVERRIDE;
+ virtual ConfirmInfoBarDelegate* AsConfirmInfoBarDelegate() OVERRIDE;
+
+ DISALLOW_COPY_AND_ASSIGN(ConfirmInfoBarDelegate);
+};
+
+#endif // CHROME_BROWSER_TAB_CONTENTS_CONFIRM_INFOBAR_DELEGATE_H_
diff --git a/chrome/browser/tab_contents/infobar_delegate.cc b/chrome/browser/tab_contents/infobar_delegate.cc
deleted file mode 100644
index 37829cf..0000000
--- a/chrome/browser/tab_contents/infobar_delegate.cc
+++ /dev/null
@@ -1,117 +0,0 @@
-// 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/tab_contents/infobar_delegate.h"
-
-#include "base/logging.h"
-#include "build/build_config.h"
-#include "content/browser/tab_contents/navigation_entry.h"
-#include "content/browser/tab_contents/navigation_controller.h"
-#include "content/browser/tab_contents/tab_contents.h"
-#include "grit/generated_resources.h"
-#include "ui/base/l10n/l10n_util.h"
-
-// LinkInfoBarDelegate --------------------------------------------------------
-
-bool LinkInfoBarDelegate::LinkClicked(WindowOpenDisposition disposition) {
- return true;
-}
-
-LinkInfoBarDelegate::LinkInfoBarDelegate(TabContents* contents)
- : InfoBarDelegate(contents) {
-}
-
-LinkInfoBarDelegate::~LinkInfoBarDelegate() {
-}
-
-LinkInfoBarDelegate* LinkInfoBarDelegate::AsLinkInfoBarDelegate() {
- return this;
-}
-
-
-// ConfirmInfoBarDelegate -----------------------------------------------------
-
-int ConfirmInfoBarDelegate::GetButtons() const {
- return BUTTON_OK | BUTTON_CANCEL;
-}
-
-string16 ConfirmInfoBarDelegate::GetButtonLabel(InfoBarButton button) const {
- return l10n_util::GetStringUTF16((button == BUTTON_OK) ? IDS_OK : IDS_CANCEL);
-}
-
-bool ConfirmInfoBarDelegate::NeedElevation(InfoBarButton button) const {
- return false;
-}
-
-bool ConfirmInfoBarDelegate::Accept() {
- return true;
-}
-
-bool ConfirmInfoBarDelegate::Cancel() {
- return true;
-}
-
-string16 ConfirmInfoBarDelegate::GetLinkText() {
- return string16();
-}
-
-bool ConfirmInfoBarDelegate::LinkClicked(WindowOpenDisposition disposition) {
- return true;
-}
-
-ConfirmInfoBarDelegate::ConfirmInfoBarDelegate(TabContents* contents)
- : InfoBarDelegate(contents) {
-}
-
-ConfirmInfoBarDelegate::~ConfirmInfoBarDelegate() {
-}
-
-bool ConfirmInfoBarDelegate::EqualsDelegate(InfoBarDelegate* delegate) const {
- ConfirmInfoBarDelegate* confirm_delegate =
- delegate->AsConfirmInfoBarDelegate();
- return confirm_delegate &&
- (confirm_delegate->GetMessageText() == GetMessageText());
-}
-
-ConfirmInfoBarDelegate* ConfirmInfoBarDelegate::AsConfirmInfoBarDelegate() {
- return this;
-}
-
-
-// SimpleAlertInfoBarDelegate -------------------------------------------------
-
-SimpleAlertInfoBarDelegate::SimpleAlertInfoBarDelegate(
- TabContents* contents,
- SkBitmap* icon,
- const string16& message,
- bool auto_expire)
- : ConfirmInfoBarDelegate(contents),
- icon_(icon),
- message_(message),
- auto_expire_(auto_expire) {
-}
-
-SimpleAlertInfoBarDelegate::~SimpleAlertInfoBarDelegate() {
-}
-
-bool SimpleAlertInfoBarDelegate::ShouldExpire(
- const NavigationController::LoadCommittedDetails& details) const {
- return auto_expire_ && ConfirmInfoBarDelegate::ShouldExpire(details);
-}
-
-void SimpleAlertInfoBarDelegate::InfoBarClosed() {
- delete this;
-}
-
-SkBitmap* SimpleAlertInfoBarDelegate::GetIcon() const {
- return icon_;
-}
-
-string16 SimpleAlertInfoBarDelegate::GetMessageText() const {
- return message_;
-}
-
-int SimpleAlertInfoBarDelegate::GetButtons() const {
- return BUTTON_NONE;
-}
diff --git a/chrome/browser/tab_contents/infobar_delegate.h b/chrome/browser/tab_contents/infobar_delegate.h
deleted file mode 100644
index bae9d99..0000000
--- a/chrome/browser/tab_contents/infobar_delegate.h
+++ /dev/null
@@ -1,124 +0,0 @@
-// 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_TAB_CONTENTS_INFOBAR_DELEGATE_H_
-#define CHROME_BROWSER_TAB_CONTENTS_INFOBAR_DELEGATE_H_
-#pragma once
-
-#include "content/browser/tab_contents/infobar_delegate.h"
-
-// An interface derived from InfoBarDelegate implemented by objects wishing to
-// control a LinkInfoBar.
-class LinkInfoBarDelegate : public InfoBarDelegate {
- public:
- // Returns the message string to be displayed in the InfoBar. |link_offset|
- // is the position where the link should be inserted.
- virtual string16 GetMessageTextWithOffset(size_t* link_offset) const = 0;
-
- // Returns the text of the link to be displayed.
- virtual string16 GetLinkText() const = 0;
-
- // Called when the Link is clicked. The |disposition| specifies how the
- // resulting document should be loaded (based on the event flags present when
- // the link was clicked). This function returns true if the InfoBar should be
- // closed now or false if it should remain until the user explicitly closes
- // it.
- virtual bool LinkClicked(WindowOpenDisposition disposition);
-
- protected:
- explicit LinkInfoBarDelegate(TabContents* contents);
- virtual ~LinkInfoBarDelegate();
-
- private:
- // InfoBarDelegate:
- virtual InfoBar* CreateInfoBar();
- virtual LinkInfoBarDelegate* AsLinkInfoBarDelegate();
-
- DISALLOW_COPY_AND_ASSIGN(LinkInfoBarDelegate);
-};
-
-// An interface derived from InfoBarDelegate implemented by objects wishing to
-// control a ConfirmInfoBar.
-class ConfirmInfoBarDelegate : public InfoBarDelegate {
- public:
- enum InfoBarButton {
- BUTTON_NONE = 0,
- BUTTON_OK = 1 << 0,
- BUTTON_CANCEL = 1 << 1,
- };
-
- // Returns the message string to be displayed for the InfoBar.
- virtual string16 GetMessageText() const = 0;
-
- // Return the buttons to be shown for this InfoBar.
- virtual int GetButtons() const;
-
- // Return the label for the specified button. The default implementation
- // returns "OK" for the OK button and "Cancel" for the Cancel button.
- virtual string16 GetButtonLabel(InfoBarButton button) const;
-
- // Return whether or not the specified button needs elevation.
- virtual bool NeedElevation(InfoBarButton button) const;
-
- // Called when the OK button is pressed. If the function returns true, the
- // InfoBarDelegate should be removed from the associated TabContents.
- virtual bool Accept();
-
- // Called when the Cancel button is pressed. If the function returns true,
- // the InfoBarDelegate should be removed from the associated TabContents.
- virtual bool Cancel();
-
- // Returns the text of the link to be displayed, if any. Otherwise returns
- // and empty string.
- virtual string16 GetLinkText();
-
- // Called when the Link is clicked. The |disposition| specifies how the
- // resulting document should be loaded (based on the event flags present when
- // the link was clicked). This function returns true if the InfoBar should be
- // closed now or false if it should remain until the user explicitly closes
- // it.
- // Will only be called if GetLinkText() returns non-empty string.
- virtual bool LinkClicked(WindowOpenDisposition disposition);
-
- protected:
- explicit ConfirmInfoBarDelegate(TabContents* contents);
- virtual ~ConfirmInfoBarDelegate();
-
- private:
- // InfoBarDelegate:
- virtual InfoBar* CreateInfoBar();
- virtual bool EqualsDelegate(InfoBarDelegate* delegate) const;
- virtual ConfirmInfoBarDelegate* AsConfirmInfoBarDelegate();
-
- DISALLOW_COPY_AND_ASSIGN(ConfirmInfoBarDelegate);
-};
-
-// Simple implementations for common use cases ---------------------------------
-
-class SimpleAlertInfoBarDelegate : public ConfirmInfoBarDelegate {
- public:
- SimpleAlertInfoBarDelegate(TabContents* contents,
- SkBitmap* icon, // May be NULL.
- const string16& message,
- bool auto_expire);
-
- private:
- virtual ~SimpleAlertInfoBarDelegate();
-
- // ConfirmInfoBarDelegate:
- virtual bool ShouldExpire(
- const NavigationController::LoadCommittedDetails& details) const;
- virtual void InfoBarClosed();
- virtual SkBitmap* GetIcon() const;
- virtual string16 GetMessageText() const;
- virtual int GetButtons() const;
-
- SkBitmap* icon_;
- string16 message_;
- bool auto_expire_; // Should it expire automatically on navigation?
-
- DISALLOW_COPY_AND_ASSIGN(SimpleAlertInfoBarDelegate);
-};
-
-#endif // CHROME_BROWSER_TAB_CONTENTS_INFOBAR_DELEGATE_H_
diff --git a/chrome/browser/tab_contents/link_infobar_delegate.cc b/chrome/browser/tab_contents/link_infobar_delegate.cc
new file mode 100644
index 0000000..8410dec
--- /dev/null
+++ b/chrome/browser/tab_contents/link_infobar_delegate.cc
@@ -0,0 +1,22 @@
+// 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/tab_contents/link_infobar_delegate.h"
+
+#include "content/browser/tab_contents/tab_contents.h"
+
+bool LinkInfoBarDelegate::LinkClicked(WindowOpenDisposition disposition) {
+ return true;
+}
+
+LinkInfoBarDelegate::LinkInfoBarDelegate(TabContents* contents)
+ : InfoBarDelegate(contents) {
+}
+
+LinkInfoBarDelegate::~LinkInfoBarDelegate() {
+}
+
+LinkInfoBarDelegate* LinkInfoBarDelegate::AsLinkInfoBarDelegate() {
+ return this;
+}
diff --git a/chrome/browser/tab_contents/link_infobar_delegate.h b/chrome/browser/tab_contents/link_infobar_delegate.h
new file mode 100644
index 0000000..8be8cb0
--- /dev/null
+++ b/chrome/browser/tab_contents/link_infobar_delegate.h
@@ -0,0 +1,46 @@
+// 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_TAB_CONTENTS_LINK_INFOBAR_DELEGATE_H_
+#define CHROME_BROWSER_TAB_CONTENTS_LINK_INFOBAR_DELEGATE_H_
+#pragma once
+
+#include "base/basictypes.h"
+#include "base/compiler_specific.h"
+#include "base/string16.h"
+#include "content/browser/tab_contents/infobar_delegate.h"
+
+class TabContents;
+
+// An interface derived from InfoBarDelegate implemented by objects wishing to
+// control a LinkInfoBar.
+class LinkInfoBarDelegate : public InfoBarDelegate {
+ public:
+ // Returns the message string to be displayed in the InfoBar. |link_offset|
+ // is the position where the link should be inserted.
+ virtual string16 GetMessageTextWithOffset(size_t* link_offset) const = 0;
+
+ // Returns the text of the link to be displayed.
+ virtual string16 GetLinkText() const = 0;
+
+ // Called when the Link is clicked. The |disposition| specifies how the
+ // resulting document should be loaded (based on the event flags present when
+ // the link was clicked). This function returns true if the InfoBar should be
+ // closed now or false if it should remain until the user explicitly closes
+ // it.
+ virtual bool LinkClicked(WindowOpenDisposition disposition);
+
+ protected:
+ explicit LinkInfoBarDelegate(TabContents* contents);
+ virtual ~LinkInfoBarDelegate();
+
+ private:
+ // InfoBarDelegate:
+ virtual InfoBar* CreateInfoBar() OVERRIDE;
+ virtual LinkInfoBarDelegate* AsLinkInfoBarDelegate() OVERRIDE;
+
+ DISALLOW_COPY_AND_ASSIGN(LinkInfoBarDelegate);
+};
+
+#endif // CHROME_BROWSER_TAB_CONTENTS_LINK_INFOBAR_DELEGATE_H_
diff --git a/chrome/browser/tab_contents/simple_alert_infobar_delegate.cc b/chrome/browser/tab_contents/simple_alert_infobar_delegate.cc
new file mode 100644
index 0000000..9d1dd04
--- /dev/null
+++ b/chrome/browser/tab_contents/simple_alert_infobar_delegate.cc
@@ -0,0 +1,44 @@
+// 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/tab_contents/simple_alert_infobar_delegate.h"
+
+#include "content/browser/tab_contents/tab_contents.h"
+#include "content/browser/tab_contents/navigation_controller.h"
+#include "third_party/skia/include/core/SkBitmap.h"
+
+SimpleAlertInfoBarDelegate::SimpleAlertInfoBarDelegate(
+ TabContents* contents,
+ SkBitmap* icon,
+ const string16& message,
+ bool auto_expire)
+ : ConfirmInfoBarDelegate(contents),
+ icon_(icon),
+ message_(message),
+ auto_expire_(auto_expire) {
+}
+
+SimpleAlertInfoBarDelegate::~SimpleAlertInfoBarDelegate() {
+}
+
+bool SimpleAlertInfoBarDelegate::ShouldExpire(
+ const NavigationController::LoadCommittedDetails& details) const {
+ return auto_expire_ && ConfirmInfoBarDelegate::ShouldExpire(details);
+}
+
+void SimpleAlertInfoBarDelegate::InfoBarClosed() {
+ delete this;
+}
+
+SkBitmap* SimpleAlertInfoBarDelegate::GetIcon() const {
+ return icon_;
+}
+
+string16 SimpleAlertInfoBarDelegate::GetMessageText() const {
+ return message_;
+}
+
+int SimpleAlertInfoBarDelegate::GetButtons() const {
+ return BUTTON_NONE;
+}
diff --git a/chrome/browser/tab_contents/simple_alert_infobar_delegate.h b/chrome/browser/tab_contents/simple_alert_infobar_delegate.h
new file mode 100644
index 0000000..5a696d4c
--- /dev/null
+++ b/chrome/browser/tab_contents/simple_alert_infobar_delegate.h
@@ -0,0 +1,42 @@
+// 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_TAB_CONTENTS_SIMPLE_ALERT_INFOBAR_DELEGATE_H_
+#define CHROME_BROWSER_TAB_CONTENTS_SIMPLE_ALERT_INFOBAR_DELEGATE_H_
+#pragma once
+
+#include "base/basictypes.h"
+#include "base/compiler_specific.h"
+#include "base/string16.h"
+#include "chrome/browser/tab_contents/confirm_infobar_delegate.h"
+
+class SkBitmap;
+class TabContents;
+
+class SimpleAlertInfoBarDelegate : public ConfirmInfoBarDelegate {
+ public:
+ SimpleAlertInfoBarDelegate(TabContents* contents,
+ SkBitmap* icon, // May be NULL.
+ const string16& message,
+ bool auto_expire);
+
+ private:
+ virtual ~SimpleAlertInfoBarDelegate();
+
+ // ConfirmInfoBarDelegate:
+ virtual bool ShouldExpire(
+ const NavigationController::LoadCommittedDetails& details) const OVERRIDE;
+ virtual void InfoBarClosed() OVERRIDE;
+ virtual SkBitmap* GetIcon() const OVERRIDE;
+ virtual string16 GetMessageText() const OVERRIDE;
+ virtual int GetButtons() const OVERRIDE;
+
+ SkBitmap* icon_;
+ string16 message_;
+ bool auto_expire_; // Should it expire automatically on navigation?
+
+ DISALLOW_COPY_AND_ASSIGN(SimpleAlertInfoBarDelegate);
+};
+
+#endif // CHROME_BROWSER_TAB_CONTENTS_SIMPLE_ALERT_INFOBAR_DELEGATE_H_
diff --git a/chrome/browser/tab_contents/tab_contents_ssl_helper.cc b/chrome/browser/tab_contents/tab_contents_ssl_helper.cc
index e8a0485..63acae4 100644
--- a/chrome/browser/tab_contents/tab_contents_ssl_helper.cc
+++ b/chrome/browser/tab_contents/tab_contents_ssl_helper.cc
@@ -10,7 +10,8 @@
#include "chrome/browser/ssl/ssl_add_cert_handler.h"
#include "chrome/browser/ssl/ssl_client_auth_handler.h"
#include "chrome/browser/ssl_client_certificate_selector.h"
-#include "chrome/browser/tab_contents/infobar_delegate.h"
+#include "chrome/browser/tab_contents/confirm_infobar_delegate.h"
+#include "chrome/browser/tab_contents/simple_alert_infobar_delegate.h"
#include "chrome/common/notification_details.h"
#include "chrome/common/notification_source.h"
#include "content/browser/certificate_viewer.h"
diff --git a/chrome/browser/task_manager/task_manager_browsertest.cc b/chrome/browser/task_manager/task_manager_browsertest.cc
index 67ac928..25664de 100644
--- a/chrome/browser/task_manager/task_manager_browsertest.cc
+++ b/chrome/browser/task_manager/task_manager_browsertest.cc
@@ -16,7 +16,7 @@
#include "chrome/browser/notifications/notification_test_util.h"
#include "chrome/browser/notifications/notification_ui_manager.h"
#include "chrome/browser/profiles/profile.h"
-#include "chrome/browser/tab_contents/infobar_delegate.h"
+#include "chrome/browser/tab_contents/confirm_infobar_delegate.h"
#include "chrome/browser/tabs/tab_strip_model.h"
#include "chrome/browser/ui/browser.h"
#include "chrome/browser/ui/browser_navigator.h"
diff --git a/chrome/browser/translate/translate_infobar_delegate.h b/chrome/browser/translate/translate_infobar_delegate.h
index 5dd2e73..69401a0 100644
--- a/chrome/browser/translate/translate_infobar_delegate.h
+++ b/chrome/browser/translate/translate_infobar_delegate.h
@@ -9,7 +9,7 @@
#include <string>
#include <vector>
-#include "chrome/browser/tab_contents/infobar_delegate.h"
+#include "chrome/browser/tab_contents/confirm_infobar_delegate.h"
#include "chrome/browser/translate/translate_prefs.h"
#include "chrome/common/translate_errors.h"
diff --git a/chrome/browser/ui/browser.cc b/chrome/browser/ui/browser.cc
index 727111a..ae9eba0 100644
--- a/chrome/browser/ui/browser.cc
+++ b/chrome/browser/ui/browser.cc
@@ -65,6 +65,7 @@
#include "chrome/browser/sync/profile_sync_service.h"
#include "chrome/browser/sync/sync_ui_util.h"
#include "chrome/browser/tab_closeable_state_watcher.h"
+#include "chrome/browser/tab_contents/simple_alert_infobar_delegate.h"
#include "chrome/browser/tabs/tab_strip_model.h"
#include "chrome/browser/ui/find_bar/find_bar.h"
#include "chrome/browser/ui/find_bar/find_bar_controller.h"
@@ -96,7 +97,6 @@
#include "content/browser/host_zoom_map.h"
#include "content/browser/renderer_host/render_view_host.h"
#include "content/browser/site_instance.h"
-#include "content/browser/tab_contents/infobar_delegate.h"
#include "content/browser/tab_contents/interstitial_page.h"
#include "content/browser/tab_contents/navigation_controller.h"
#include "content/browser/tab_contents/navigation_entry.h"
diff --git a/chrome/browser/ui/browser_init.cc b/chrome/browser/ui/browser_init.cc
index 781c48b..5d84c4d 100644
--- a/chrome/browser/ui/browser_init.cc
+++ b/chrome/browser/ui/browser_init.cc
@@ -40,7 +40,8 @@
#include "chrome/browser/sessions/session_restore.h"
#include "chrome/browser/sessions/session_service.h"
#include "chrome/browser/shell_integration.h"
-#include "chrome/browser/tab_contents/infobar_delegate.h"
+#include "chrome/browser/tab_contents/confirm_infobar_delegate.h"
+#include "chrome/browser/tab_contents/simple_alert_infobar_delegate.h"
#include "chrome/browser/tabs/pinned_tab_codec.h"
#include "chrome/browser/tabs/tab_strip_model.h"
#include "chrome/browser/ui/browser_navigator.h"
diff --git a/chrome/browser/ui/cocoa/extensions/extension_installed_bubble_bridge.mm b/chrome/browser/ui/cocoa/extensions/extension_installed_bubble_bridge.mm
index bd93bd2..c6a8143 100644
--- a/chrome/browser/ui/cocoa/extensions/extension_installed_bubble_bridge.mm
+++ b/chrome/browser/ui/cocoa/extensions/extension_installed_bubble_bridge.mm
@@ -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.
#import <Cocoa/Cocoa.h>
#include "base/i18n/rtl.h"
-#include "chrome/browser/tab_contents/infobar_delegate.h"
-#import "chrome/browser/ui/cocoa/extensions/extension_installed_bubble_controller.h"
+#include "chrome/browser/tab_contents/confirm_infobar_delegate.h"
+#include "chrome/browser/tab_contents/simple_alert_infobar_delegate.h"
#include "chrome/browser/ui/browser.h"
#include "chrome/browser/ui/browser_dialogs.h"
+#import "chrome/browser/ui/cocoa/extensions/extension_installed_bubble_controller.h"
#include "chrome/common/extensions/extension.h"
#include "chrome/common/extensions/extension_action.h"
#include "grit/generated_resources.h"
diff --git a/chrome/browser/ui/cocoa/infobars/infobar.h b/chrome/browser/ui/cocoa/infobars/infobar.h
index b17ce2e..75a69b2 100644
--- a/chrome/browser/ui/cocoa/infobars/infobar.h
+++ b/chrome/browser/ui/cocoa/infobars/infobar.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.
@@ -12,7 +12,7 @@
// A C++ wrapper around an Objective-C InfoBarController. This class
// exists solely to be the return value for InfoBarDelegate::CreateInfoBar(),
-// as defined in chrome/browser/tab_contents/infobar_delegate.h. This
+// as defined in chrome/browser/tab_contents/confirm_infobar_delegate.h. This
// class would be analogous to the various bridge classes we already
// have, but since there is no pre-defined InfoBar interface, it is
// easier to simply throw away this object and deal with the
diff --git a/chrome/browser/ui/cocoa/infobars/infobar_container_controller.mm b/chrome/browser/ui/cocoa/infobars/infobar_container_controller.mm
index a59c205..8a374ca17 100644
--- a/chrome/browser/ui/cocoa/infobars/infobar_container_controller.mm
+++ b/chrome/browser/ui/cocoa/infobars/infobar_container_controller.mm
@@ -4,7 +4,7 @@
#include "base/logging.h"
#include "base/mac/mac_util.h"
-#include "chrome/browser/tab_contents/infobar_delegate.h"
+#include "chrome/browser/tab_contents/confirm_infobar_delegate.h"
#import "chrome/browser/ui/cocoa/animatable_view.h"
#include "chrome/browser/ui/cocoa/infobars/infobar.h"
#import "chrome/browser/ui/cocoa/infobars/infobar_container_controller.h"
diff --git a/chrome/browser/ui/cocoa/infobars/infobar_controller.mm b/chrome/browser/ui/cocoa/infobars/infobar_controller.mm
index a2c565f..0c9967a 100644
--- a/chrome/browser/ui/cocoa/infobars/infobar_controller.mm
+++ b/chrome/browser/ui/cocoa/infobars/infobar_controller.mm
@@ -7,7 +7,8 @@
#include "base/logging.h" // for NOTREACHED()
#include "base/mac/mac_util.h"
#include "base/sys_string_conversions.h"
-#include "chrome/browser/tab_contents/infobar_delegate.h"
+#include "chrome/browser/tab_contents/confirm_infobar_delegate.h"
+#include "chrome/browser/tab_contents/link_infobar_delegate.h"
#import "chrome/browser/ui/cocoa/animatable_view.h"
#include "chrome/browser/ui/cocoa/event_utils.h"
#include "chrome/browser/ui/cocoa/infobars/infobar.h"
diff --git a/chrome/browser/ui/cocoa/infobars/infobar_controller_unittest.mm b/chrome/browser/ui/cocoa/infobars/infobar_controller_unittest.mm
index 666969f..5e5d080 100644
--- a/chrome/browser/ui/cocoa/infobars/infobar_controller_unittest.mm
+++ b/chrome/browser/ui/cocoa/infobars/infobar_controller_unittest.mm
@@ -7,7 +7,7 @@
#include "base/scoped_nsobject.h"
#include "base/string_util.h"
#include "base/sys_string_conversions.h"
-#include "chrome/browser/tab_contents/infobar_delegate.h"
+#include "chrome/browser/tab_contents/confirm_infobar_delegate.h"
#import "chrome/browser/ui/cocoa/cocoa_test_helper.h"
#import "chrome/browser/ui/cocoa/infobars/infobar_container_controller.h"
#import "chrome/browser/ui/cocoa/infobars/infobar_controller.h"
diff --git a/chrome/browser/ui/cocoa/infobars/infobar_test_helper.h b/chrome/browser/ui/cocoa/infobars/infobar_test_helper.h
index aca76f9..44ee81e 100644
--- a/chrome/browser/ui/cocoa/infobars/infobar_test_helper.h
+++ b/chrome/browser/ui/cocoa/infobars/infobar_test_helper.h
@@ -6,8 +6,8 @@
#define CHROME_BROWSER_UI_COCOA_INFOBARS_INFOBAR_TEST_HELPER_H_
#pragma once
-#include "chrome/browser/tab_contents/infobar_delegate.h"
-
+#include "chrome/browser/tab_contents/confirm_infobar_delegate.h"
+#include "chrome/browser/tab_contents/link_infobar_delegate.h"
// MockLinkInfoBarDelegate ----------------------------------------------------
diff --git a/chrome/browser/ui/cocoa/keystone_infobar.mm b/chrome/browser/ui/cocoa/keystone_infobar.mm
index 5735ceb..19f1bab 100644
--- a/chrome/browser/ui/cocoa/keystone_infobar.mm
+++ b/chrome/browser/ui/cocoa/keystone_infobar.mm
@@ -15,7 +15,7 @@
#include "chrome/browser/first_run/first_run.h"
#include "chrome/browser/prefs/pref_service.h"
#include "chrome/browser/profiles/profile.h"
-#include "chrome/browser/tab_contents/infobar_delegate.h"
+#include "chrome/browser/tab_contents/confirm_infobar_delegate.h"
#include "chrome/browser/ui/browser.h"
#include "chrome/browser/ui/browser_list.h"
#include "chrome/common/chrome_switches.h"
diff --git a/chrome/browser/ui/gtk/infobars/confirm_infobar_gtk.h b/chrome/browser/ui/gtk/infobars/confirm_infobar_gtk.h
index 0ac2186..dce45da 100644
--- a/chrome/browser/ui/gtk/infobars/confirm_infobar_gtk.h
+++ b/chrome/browser/ui/gtk/infobars/confirm_infobar_gtk.h
@@ -7,6 +7,7 @@
#pragma once
#include "base/basictypes.h"
+#include "chrome/browser/tab_contents/confirm_infobar_delegate.h"
#include "chrome/browser/ui/gtk/infobars/infobar_gtk.h"
#include "ui/base/gtk/gtk_signal.h"
diff --git a/chrome/browser/ui/gtk/infobars/infobar_container_gtk.cc b/chrome/browser/ui/gtk/infobars/infobar_container_gtk.cc
index 4bce8b1..54beab7 100644
--- a/chrome/browser/ui/gtk/infobars/infobar_container_gtk.cc
+++ b/chrome/browser/ui/gtk/infobars/infobar_container_gtk.cc
@@ -11,7 +11,6 @@
#include "base/command_line.h"
#include "chrome/browser/browser_window.h"
#include "chrome/browser/platform_util.h"
-#include "chrome/browser/tab_contents/infobar_delegate.h"
#include "chrome/browser/ui/gtk/browser_window_gtk.h"
#include "chrome/browser/ui/gtk/gtk_theme_provider.h"
#include "chrome/browser/ui/gtk/gtk_util.h"
@@ -19,6 +18,7 @@
#include "chrome/common/notification_details.h"
#include "chrome/common/notification_source.h"
#include "content/browser/tab_contents/tab_contents.h"
+#include "content/browser/tab_contents/infobar_delegate.h"
#include "third_party/skia/include/core/SkPaint.h"
namespace {
diff --git a/chrome/browser/ui/gtk/infobars/infobar_gtk.h b/chrome/browser/ui/gtk/infobars/infobar_gtk.h
index 30f349a..206f85e 100644
--- a/chrome/browser/ui/gtk/infobars/infobar_gtk.h
+++ b/chrome/browser/ui/gtk/infobars/infobar_gtk.h
@@ -8,12 +8,12 @@
#include "base/basictypes.h"
#include "base/scoped_ptr.h"
-#include "chrome/browser/tab_contents/infobar_delegate.h"
#include "chrome/browser/ui/gtk/infobars/infobar_arrow_model.h"
#include "chrome/browser/ui/gtk/owned_widget_gtk.h"
#include "chrome/browser/ui/gtk/slide_animator_gtk.h"
#include "chrome/common/notification_observer.h"
#include "chrome/common/notification_registrar.h"
+#include "content/browser/tab_contents/infobar_delegate.h"
#include "third_party/skia/include/core/SkPaint.h"
#include "ui/base/gtk/gtk_signal.h"
diff --git a/chrome/browser/ui/gtk/infobars/link_infobar_gtk.cc b/chrome/browser/ui/gtk/infobars/link_infobar_gtk.cc
index 082acd3..db4821b 100644
--- a/chrome/browser/ui/gtk/infobars/link_infobar_gtk.cc
+++ b/chrome/browser/ui/gtk/infobars/link_infobar_gtk.cc
@@ -4,7 +4,7 @@
#include "chrome/browser/ui/gtk/infobars/link_infobar_gtk.h"
-#include "chrome/browser/tab_contents/infobar_delegate.h"
+#include "chrome/browser/tab_contents/link_infobar_delegate.h"
#include "chrome/browser/ui/gtk/gtk_util.h"
// LinkInfoBarDelegate ---------------------------------------------------------
diff --git a/chrome/browser/ui/tab_contents/tab_contents_wrapper.cc b/chrome/browser/ui/tab_contents/tab_contents_wrapper.cc
index 7dc81f8..9c61798 100644
--- a/chrome/browser/ui/tab_contents/tab_contents_wrapper.cc
+++ b/chrome/browser/ui/tab_contents/tab_contents_wrapper.cc
@@ -12,7 +12,7 @@
#include "chrome/browser/password_manager_delegate_impl.h"
#include "chrome/browser/prefs/pref_service.h"
#include "chrome/browser/profiles/profile.h"
-#include "chrome/browser/tab_contents/infobar_delegate.h"
+#include "chrome/browser/tab_contents/simple_alert_infobar_delegate.h"
#include "chrome/browser/ui/find_bar/find_tab_helper.h"
#include "chrome/browser/ui/search_engines/search_engine_tab_helper.h"
#include "chrome/browser/ui/tab_contents/tab_contents_wrapper_delegate.h"
@@ -20,8 +20,8 @@
#include "chrome/common/pref_names.h"
#include "chrome/common/render_messages.h"
#include "content/browser/tab_contents/tab_contents.h"
-#include "grit/locale_settings.h"
#include "grit/generated_resources.h"
+#include "grit/locale_settings.h"
#include "grit/platform_locale_settings.h"
#include "ui/base/l10n/l10n_util.h"
#include "webkit/glue/webpreferences.h"
diff --git a/chrome/browser/ui/views/infobars/confirm_infobar.cc b/chrome/browser/ui/views/infobars/confirm_infobar.cc
index d190cfc..5a40d68 100644
--- a/chrome/browser/ui/views/infobars/confirm_infobar.cc
+++ b/chrome/browser/ui/views/infobars/confirm_infobar.cc
@@ -4,7 +4,7 @@
#include "chrome/browser/ui/views/infobars/confirm_infobar.h"
-#include "chrome/browser/tab_contents/infobar_delegate.h"
+#include "chrome/browser/tab_contents/confirm_infobar_delegate.h"
#include "chrome/browser/ui/views/event_utils.h"
#include "views/controls/button/text_button.h"
#include "views/controls/label.h"
diff --git a/chrome/browser/ui/views/infobars/infobar_background.h b/chrome/browser/ui/views/infobars/infobar_background.h
index 1849588..9c1e127 100644
--- a/chrome/browser/ui/views/infobars/infobar_background.h
+++ b/chrome/browser/ui/views/infobars/infobar_background.h
@@ -7,7 +7,7 @@
#pragma once
#include "base/scoped_ptr.h"
-#include "chrome/browser/tab_contents/infobar_delegate.h"
+#include "content/browser/tab_contents/infobar_delegate.h"
#include "views/background.h"
class InfoBarBackground : public views::Background {
diff --git a/chrome/browser/ui/views/infobars/infobar_container.cc b/chrome/browser/ui/views/infobars/infobar_container.cc
index 6c59d49..be3e0eef 100644
--- a/chrome/browser/ui/views/infobars/infobar_container.cc
+++ b/chrome/browser/ui/views/infobars/infobar_container.cc
@@ -5,7 +5,7 @@
#include "chrome/browser/ui/views/infobars/infobar_container.h"
#include "base/utf_string_conversions.h"
-#include "chrome/browser/tab_contents/infobar_delegate.h"
+#include "chrome/browser/tab_contents/confirm_infobar_delegate.h"
#include "chrome/browser/ui/view_ids.h"
#include "chrome/browser/ui/views/infobars/infobar_view.h"
#include "chrome/common/notification_details.h"
diff --git a/chrome/browser/ui/views/infobars/infobar_view.cc b/chrome/browser/ui/views/infobars/infobar_view.cc
index eb8237c..f0e4bc9 100644
--- a/chrome/browser/ui/views/infobars/infobar_view.cc
+++ b/chrome/browser/ui/views/infobars/infobar_view.cc
@@ -6,7 +6,7 @@
#include "base/message_loop.h"
#include "base/utf_string_conversions.h"
-#include "chrome/browser/tab_contents/infobar_delegate.h"
+#include "chrome/browser/tab_contents/confirm_infobar_delegate.h"
#include "chrome/browser/ui/views/infobars/infobar_background.h"
#include "chrome/browser/ui/views/infobars/infobar_button_border.h"
#include "chrome/browser/ui/views/infobars/infobar_container.h"
@@ -31,8 +31,8 @@
#include "base/win/win_util.h"
#include "base/win/windows_version.h"
-#include "ui/gfx/icon_util.h"
#include "ui/base/win/hwnd_util.h"
+#include "ui/gfx/icon_util.h"
#endif
// static
diff --git a/chrome/browser/ui/views/infobars/link_infobar.cc b/chrome/browser/ui/views/infobars/link_infobar.cc
index 9548b58..2343e86 100644
--- a/chrome/browser/ui/views/infobars/link_infobar.cc
+++ b/chrome/browser/ui/views/infobars/link_infobar.cc
@@ -4,7 +4,7 @@
#include "chrome/browser/ui/views/infobars/link_infobar.h"
-#include "chrome/browser/tab_contents/infobar_delegate.h"
+#include "chrome/browser/tab_contents/link_infobar_delegate.h"
#include "chrome/browser/ui/views/event_utils.h"
// LinkInfoBarDelegate --------------------------------------------------------