diff options
-rw-r--r-- | chrome/browser/accessibility/accessibility_extension_apitest.cc | 2 | ||||
-rw-r--r-- | chrome/browser/plugins/plugin_observer.cc | 2 | ||||
-rw-r--r-- | chrome/browser/ssl/ssl_add_certificate.cc | 2 | ||||
-rw-r--r-- | chrome/browser/ui/browser.cc | 2 | ||||
-rw-r--r-- | chrome/browser/ui/chrome_select_file_policy.cc | 2 | ||||
-rw-r--r-- | chrome/browser/ui/cocoa/browser_window_controller_browsertest.mm | 2 | ||||
-rw-r--r-- | chrome/browser/ui/startup/bad_flags_prompt.cc | 2 | ||||
-rw-r--r-- | chrome/chrome_browser.gypi | 2 | ||||
-rw-r--r-- | components/infobars.gypi | 2 | ||||
-rw-r--r-- | components/infobars/core/BUILD.gn | 2 | ||||
-rw-r--r-- | components/infobars/core/simple_alert_infobar_delegate.cc (renamed from chrome/browser/infobars/simple_alert_infobar_delegate.cc) | 17 | ||||
-rw-r--r-- | components/infobars/core/simple_alert_infobar_delegate.h (renamed from chrome/browser/infobars/simple_alert_infobar_delegate.h) | 16 |
12 files changed, 29 insertions, 24 deletions
diff --git a/chrome/browser/accessibility/accessibility_extension_apitest.cc b/chrome/browser/accessibility/accessibility_extension_apitest.cc index f51977c..a2df45f 100644 --- a/chrome/browser/accessibility/accessibility_extension_apitest.cc +++ b/chrome/browser/accessibility/accessibility_extension_apitest.cc @@ -6,10 +6,10 @@ #include "base/strings/utf_string_conversions.h" #include "chrome/browser/extensions/extension_apitest.h" #include "chrome/browser/infobars/infobar_service.h" -#include "chrome/browser/infobars/simple_alert_infobar_delegate.h" #include "chrome/browser/ui/browser.h" #include "chrome/browser/ui/tabs/tab_strip_model.h" #include "chrome/test/base/test_switches.h" +#include "components/infobars/core/simple_alert_infobar_delegate.h" #include "extensions/common/switches.h" // Times out on win syzyasan, http://crbug.com/166026 diff --git a/chrome/browser/plugins/plugin_observer.cc b/chrome/browser/plugins/plugin_observer.cc index fd6a8f5..b4d472e 100644 --- a/chrome/browser/plugins/plugin_observer.cc +++ b/chrome/browser/plugins/plugin_observer.cc @@ -12,7 +12,6 @@ #include "base/strings/utf_string_conversions.h" #include "chrome/browser/browser_process.h" #include "chrome/browser/infobars/infobar_service.h" -#include "chrome/browser/infobars/simple_alert_infobar_delegate.h" #include "chrome/browser/lifetime/application_lifetime.h" #include "chrome/browser/metrics/metrics_services_manager.h" #include "chrome/browser/plugins/plugin_finder.h" @@ -25,6 +24,7 @@ #include "components/content_settings/core/browser/host_content_settings_map.h" #include "components/infobars/core/confirm_infobar_delegate.h" #include "components/infobars/core/infobar.h" +#include "components/infobars/core/simple_alert_infobar_delegate.h" #include "content/public/browser/plugin_service.h" #include "content/public/browser/render_frame_host.h" #include "content/public/browser/render_view_host.h" diff --git a/chrome/browser/ssl/ssl_add_certificate.cc b/chrome/browser/ssl/ssl_add_certificate.cc index 404416d..b4939cf 100644 --- a/chrome/browser/ssl/ssl_add_certificate.cc +++ b/chrome/browser/ssl/ssl_add_certificate.cc @@ -9,10 +9,10 @@ #include "base/strings/utf_string_conversions.h" #include "chrome/browser/certificate_viewer.h" #include "chrome/browser/infobars/infobar_service.h" -#include "chrome/browser/infobars/simple_alert_infobar_delegate.h" #include "chrome/grit/generated_resources.h" #include "components/infobars/core/confirm_infobar_delegate.h" #include "components/infobars/core/infobar.h" +#include "components/infobars/core/simple_alert_infobar_delegate.h" #include "content/public/browser/browser_thread.h" #include "content/public/browser/render_frame_host.h" #include "content/public/browser/web_contents.h" diff --git a/chrome/browser/ui/browser.cc b/chrome/browser/ui/browser.cc index 086b7715..a48e659 100644 --- a/chrome/browser/ui/browser.cc +++ b/chrome/browser/ui/browser.cc @@ -60,7 +60,6 @@ #include "chrome/browser/first_run/first_run.h" #include "chrome/browser/history/top_sites.h" #include "chrome/browser/infobars/infobar_service.h" -#include "chrome/browser/infobars/simple_alert_infobar_delegate.h" #include "chrome/browser/lifetime/application_lifetime.h" #include "chrome/browser/notifications/notification_ui_manager.h" #include "chrome/browser/pepper_broker_infobar_delegate.h" @@ -154,6 +153,7 @@ #include "components/bookmarks/browser/bookmark_utils.h" #include "components/content_settings/core/browser/host_content_settings_map.h" #include "components/google/core/browser/google_url_tracker.h" +#include "components/infobars/core/simple_alert_infobar_delegate.h" #include "components/search/search.h" #include "components/sessions/session_types.h" #include "components/startup_metric_utils/startup_metric_utils.h" diff --git a/chrome/browser/ui/chrome_select_file_policy.cc b/chrome/browser/ui/chrome_select_file_policy.cc index 3cdb5de..caff78e 100644 --- a/chrome/browser/ui/chrome_select_file_policy.cc +++ b/chrome/browser/ui/chrome_select_file_policy.cc @@ -10,9 +10,9 @@ #include "base/prefs/pref_service.h" #include "chrome/browser/browser_process.h" #include "chrome/browser/infobars/infobar_service.h" -#include "chrome/browser/infobars/simple_alert_infobar_delegate.h" #include "chrome/common/pref_names.h" #include "chrome/grit/generated_resources.h" +#include "components/infobars/core/simple_alert_infobar_delegate.h" #include "ui/base/l10n/l10n_util.h" ChromeSelectFilePolicy::ChromeSelectFilePolicy( diff --git a/chrome/browser/ui/cocoa/browser_window_controller_browsertest.mm b/chrome/browser/ui/cocoa/browser_window_controller_browsertest.mm index 317bbd8..e4e1224 100644 --- a/chrome/browser/ui/cocoa/browser_window_controller_browsertest.mm +++ b/chrome/browser/ui/cocoa/browser_window_controller_browsertest.mm @@ -12,7 +12,6 @@ #include "chrome/browser/browser_process.h" #include "chrome/browser/devtools/devtools_window_testing.h" #include "chrome/browser/infobars/infobar_service.h" -#include "chrome/browser/infobars/simple_alert_infobar_delegate.h" #include "chrome/browser/profiles/profile.h" #include "chrome/browser/profiles/profile_manager.h" #include "chrome/browser/ui/bookmarks/bookmark_utils.h" @@ -38,6 +37,7 @@ #include "chrome/browser/ui/tabs/tab_strip_model.h" #include "chrome/test/base/in_process_browser_test.h" #include "chrome/test/base/testing_profile.h" +#include "components/infobars/core/simple_alert_infobar_delegate.h" #include "content/public/browser/web_contents.h" #include "content/public/test/test_utils.h" #import "testing/gtest_mac.h" diff --git a/chrome/browser/ui/startup/bad_flags_prompt.cc b/chrome/browser/ui/startup/bad_flags_prompt.cc index 2c0a9b6..4b59497 100644 --- a/chrome/browser/ui/startup/bad_flags_prompt.cc +++ b/chrome/browser/ui/startup/bad_flags_prompt.cc @@ -8,7 +8,6 @@ #include "base/files/file_path.h" #include "base/strings/utf_string_conversions.h" #include "chrome/browser/infobars/infobar_service.h" -#include "chrome/browser/infobars/simple_alert_infobar_delegate.h" #include "chrome/browser/ui/browser.h" #include "chrome/browser/ui/simple_message_box.h" #include "chrome/browser/ui/tabs/tab_strip_model.h" @@ -17,6 +16,7 @@ #include "chrome/common/switch_utils.h" #include "chrome/grit/chromium_strings.h" #include "chrome/grit/generated_resources.h" +#include "components/infobars/core/simple_alert_infobar_delegate.h" #include "components/invalidation/invalidation_switches.h" #include "components/nacl/common/nacl_switches.h" #include "components/startup_metric_utils/startup_metric_utils.h" diff --git a/chrome/chrome_browser.gypi b/chrome/chrome_browser.gypi index a57f2d0..2d04f84 100644 --- a/chrome/chrome_browser.gypi +++ b/chrome/chrome_browser.gypi @@ -391,8 +391,6 @@ 'browser/infobars/infobar_service.h', 'browser/infobars/insecure_content_infobar_delegate.cc', 'browser/infobars/insecure_content_infobar_delegate.h', - 'browser/infobars/simple_alert_infobar_delegate.cc', - 'browser/infobars/simple_alert_infobar_delegate.h', 'browser/install_verification/win/imported_module_verification.cc', 'browser/install_verification/win/imported_module_verification.h', 'browser/install_verification/win/install_verification.cc', diff --git a/components/infobars.gypi b/components/infobars.gypi index e2066e1..449082c 100644 --- a/components/infobars.gypi +++ b/components/infobars.gypi @@ -35,6 +35,8 @@ 'infobars/core/infobar_manager.h', 'infobars/core/infobars_switches.cc', 'infobars/core/infobars_switches.h', + 'infobars/core/simple_alert_infobar_delegate.cc', + 'infobars/core/simple_alert_infobar_delegate.h', ], }, ], diff --git a/components/infobars/core/BUILD.gn b/components/infobars/core/BUILD.gn index 2959e0d..79e658f 100644 --- a/components/infobars/core/BUILD.gn +++ b/components/infobars/core/BUILD.gn @@ -16,6 +16,8 @@ static_library("core") { "infobar_manager.h", "infobars_switches.cc", "infobars_switches.h", + "simple_alert_infobar_delegate.cc", + "simple_alert_infobar_delegate.h", ] public_deps = [ diff --git a/chrome/browser/infobars/simple_alert_infobar_delegate.cc b/components/infobars/core/simple_alert_infobar_delegate.cc index 02b71b0..9262d05 100644 --- a/chrome/browser/infobars/simple_alert_infobar_delegate.cc +++ b/components/infobars/core/simple_alert_infobar_delegate.cc @@ -2,19 +2,20 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#include "chrome/browser/infobars/simple_alert_infobar_delegate.h" +#include "components/infobars/core/simple_alert_infobar_delegate.h" -#include "chrome/browser/infobars/infobar_service.h" #include "components/infobars/core/infobar.h" +#include "components/infobars/core/infobar_manager.h" #include "third_party/skia/include/core/SkBitmap.h" // static -void SimpleAlertInfoBarDelegate::Create(InfoBarService* infobar_service, - int icon_id, - const base::string16& message, - bool auto_expire) { - infobar_service->AddInfoBar( - infobar_service->CreateConfirmInfoBar(scoped_ptr<ConfirmInfoBarDelegate>( +void SimpleAlertInfoBarDelegate::Create( + infobars::InfoBarManager* infobar_manager, + int icon_id, + const base::string16& message, + bool auto_expire) { + infobar_manager->AddInfoBar( + infobar_manager->CreateConfirmInfoBar(scoped_ptr<ConfirmInfoBarDelegate>( new SimpleAlertInfoBarDelegate(icon_id, message, auto_expire)))); } diff --git a/chrome/browser/infobars/simple_alert_infobar_delegate.h b/components/infobars/core/simple_alert_infobar_delegate.h index d25ab50..4ec42d6 100644 --- a/chrome/browser/infobars/simple_alert_infobar_delegate.h +++ b/components/infobars/core/simple_alert_infobar_delegate.h @@ -2,22 +2,24 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#ifndef CHROME_BROWSER_INFOBARS_SIMPLE_ALERT_INFOBAR_DELEGATE_H_ -#define CHROME_BROWSER_INFOBARS_SIMPLE_ALERT_INFOBAR_DELEGATE_H_ +#ifndef COMPONENTS_INFOBARS_CORE_SIMPLE_ALERT_INFOBAR_DELEGATE_H_ +#define COMPONENTS_INFOBARS_CORE_SIMPLE_ALERT_INFOBAR_DELEGATE_H_ #include "base/basictypes.h" #include "base/compiler_specific.h" #include "base/strings/string16.h" #include "components/infobars/core/confirm_infobar_delegate.h" -class InfoBarService; +namespace infobars { +class InfoBarManager; +} class SimpleAlertInfoBarDelegate : public ConfirmInfoBarDelegate { public: // Creates a simple alert infobar and delegate and adds the infobar to - // |infobar_service|. - static void Create(InfoBarService* infobar_service, - int icon_id, // May be |kNoIconID| if no icon is shown. + // |infobar_manager|. |icon_id| may be kNoIconID if no icon is shown. + static void Create(infobars::InfoBarManager* infobar_manager, + int icon_id, const base::string16& message, bool auto_expire); @@ -40,4 +42,4 @@ class SimpleAlertInfoBarDelegate : public ConfirmInfoBarDelegate { DISALLOW_COPY_AND_ASSIGN(SimpleAlertInfoBarDelegate); }; -#endif // CHROME_BROWSER_INFOBARS_SIMPLE_ALERT_INFOBAR_DELEGATE_H_ +#endif // COMPONENTS_INFOBARS_CORE_SIMPLE_ALERT_INFOBAR_DELEGATE_H_ |