diff options
author | pkotwicz <pkotwicz@chromium.org> | 2015-01-15 16:32:33 -0800 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2015-01-16 00:33:38 +0000 |
commit | afd6d92c4bd52b46fa70bab5b962b5d75f8cef55 (patch) | |
tree | 883f517484ca8fdf2164b3d0ceafaf16c7d2e928 | |
parent | 7dbc1428fa4363ff47972c2076cd4395e05e9440 (diff) | |
download | chromium_src-afd6d92c4bd52b46fa70bab5b962b5d75f8cef55.zip chromium_src-afd6d92c4bd52b46fa70bab5b962b5d75f8cef55.tar.gz chromium_src-afd6d92c4bd52b46fa70bab5b962b5d75f8cef55.tar.bz2 |
Remove remainder of USE_ATHENA ifdefs
BUG=440818
TEST=None
Review URL: https://codereview.chromium.org/855503002
Cr-Commit-Position: refs/heads/master@{#311776}
12 files changed, 12 insertions, 143 deletions
diff --git a/chrome/browser/browser_process_impl.cc b/chrome/browser/browser_process_impl.cc index 387fa7c..1f70dfd 100644 --- a/chrome/browser/browser_process_impl.cc +++ b/chrome/browser/browser_process_impl.cc @@ -203,10 +203,8 @@ BrowserProcessImpl::BrowserProcessImpl( #endif #if defined(ENABLE_EXTENSIONS) -#if !defined(USE_ATHENA) // Athena sets its own instance during Athena's init process. extensions::AppWindowClient::Set(ChromeAppWindowClient::GetInstance()); -#endif extension_event_router_forwarder_ = new extensions::EventRouterForwarder; ExtensionRendererState::GetInstance()->Init(); diff --git a/chrome/browser/chrome_content_browser_client.cc b/chrome/browser/chrome_content_browser_client.cc index 27f668f..a855f0c 100644 --- a/chrome/browser/chrome_content_browser_client.cc +++ b/chrome/browser/chrome_content_browser_client.cc @@ -194,10 +194,7 @@ #include "chrome/browser/ui/views/chrome_browser_main_extra_parts_views.h" #endif -#if defined(USE_ATHENA) -#include "athena/content/public/web_contents_view_delegate_creator.h" -#include "chrome/browser/ui/views/athena/chrome_browser_main_extra_parts_athena.h" -#elif defined(USE_ASH) +#if defined(USE_ASH) #include "chrome/browser/ui/views/ash/chrome_browser_main_extra_parts_ash.h" #endif @@ -722,9 +719,7 @@ content::BrowserMainParts* ChromeContentBrowserClient::CreateBrowserMainParts( // TODO(oshima): Athena on chrome currently requires USE_ASH to build. // We should reduce the dependency as much as possible. -#if defined(USE_ATHENA) - main_parts->AddParts(CreateChromeBrowserMainExtraPartsAthena()); -#elif defined(USE_ASH) +#if defined(USE_ASH) main_parts->AddParts(new ChromeBrowserMainExtraPartsAsh()); #endif @@ -832,11 +827,7 @@ void ChromeContentBrowserClient::GetStoragePartitionConfigForSite( content::WebContentsViewDelegate* ChromeContentBrowserClient::GetWebContentsViewDelegate( content::WebContents* web_contents) { -#if defined(USE_ATHENA) - return athena::CreateWebContentsViewDelegate(web_contents); -#else return chrome::CreateWebContentsViewDelegate(web_contents); -#endif } void ChromeContentBrowserClient::RenderProcessWillLaunch( diff --git a/chrome/browser/fullscreen_chromeos.cc b/chrome/browser/fullscreen_chromeos.cc index 7563930..652114e 100644 --- a/chrome/browser/fullscreen_chromeos.cc +++ b/chrome/browser/fullscreen_chromeos.cc @@ -7,10 +7,6 @@ #include "ash/root_window_controller.h" bool IsFullScreenMode() { -#if defined(USE_ATHENA) - // crbug.com/408755 - return false; -#endif // TODO(oshima): Fullscreen is per display state. Investigate // and fix if necessary. ash::RootWindowController* controller = diff --git a/chrome/browser/notifications/message_center_notification_manager.cc b/chrome/browser/notifications/message_center_notification_manager.cc index d99a38b..aed20e8 100644 --- a/chrome/browser/notifications/message_center_notification_manager.cc +++ b/chrome/browser/notifications/message_center_notification_manager.cc @@ -73,11 +73,8 @@ MessageCenterNotificationManager::MessageCenterNotificationManager( message_center_->SetNotifierSettingsProvider(settings_provider_.get()); #if defined(OS_CHROMEOS) -#if !defined(USE_ATHENA) - // TODO(oshima|hashimoto): Support notification on athena. crbug.com/408755. blockers_.push_back( new LoginStateNotificationBlockerChromeOS(message_center)); -#endif #else blockers_.push_back(new ScreenLockNotificationBlocker(message_center)); #endif diff --git a/chrome/browser/prefs/browser_prefs.cc b/chrome/browser/prefs/browser_prefs.cc index de0f753..24d5bfcbb 100644 --- a/chrome/browser/prefs/browser_prefs.cc +++ b/chrome/browser/prefs/browser_prefs.cc @@ -169,6 +169,7 @@ #include "chrome/browser/chromeos/login/users/avatar/user_image_sync_observer.h" #include "chrome/browser/chromeos/login/users/chrome_user_manager_impl.h" #include "chrome/browser/chromeos/login/users/multi_profile_user_controller.h" +#include "chrome/browser/chromeos/login/users/wallpaper/wallpaper_manager.h" #include "chrome/browser/chromeos/net/proxy_config_handler.h" #include "chrome/browser/chromeos/policy/auto_enrollment_client.h" #include "chrome/browser/chromeos/policy/browser_policy_connector_chromeos.h" @@ -214,10 +215,6 @@ #include "chrome/browser/ui/ash/chrome_launcher_prefs.h" #endif -#if !defined(USE_ATHENA) -#include "chrome/browser/chromeos/login/users/wallpaper/wallpaper_manager.h" -#endif - namespace { enum MigratedPreferences { @@ -345,9 +342,7 @@ void RegisterLocalState(PrefRegistrySimple* registry) { chromeos::system::AutomaticRebootManager::RegisterPrefs(registry); chromeos::UserImageManager::RegisterPrefs(registry); chromeos::UserSessionManager::RegisterPrefs(registry); -#if !defined(USE_ATHENA) chromeos::WallpaperManager::RegisterPrefs(registry); -#endif chromeos::echo_offer::RegisterPrefs(registry); extensions::ExtensionAssetsManagerChromeOS::RegisterPrefs(registry); invalidation::InvalidatorStorage::RegisterPrefs(registry); diff --git a/chrome/browser/renderer_host/pepper/pepper_output_protection_message_filter.cc b/chrome/browser/renderer_host/pepper/pepper_output_protection_message_filter.cc index c785071..4f0be3a 100644 --- a/chrome/browser/renderer_host/pepper/pepper_output_protection_message_filter.cc +++ b/chrome/browser/renderer_host/pepper/pepper_output_protection_message_filter.cc @@ -124,11 +124,6 @@ PepperOutputProtectionMessageFilter::Delegate::Delegate(int render_process_id, client_id_(ui::DisplayConfigurator::kInvalidClientId), display_id_(0) { DCHECK(content::BrowserThread::CurrentlyOn(content::BrowserThread::IO)); -#if defined(USE_ATHENA) - // Fail for now so that we can catch the event in the crash report. - // crbug.com/381398 - CHECK(false); -#endif } PepperOutputProtectionMessageFilter::Delegate::~Delegate() { diff --git a/chrome/browser/renderer_host/pepper/pepper_talk_host.cc b/chrome/browser/renderer_host/pepper/pepper_talk_host.cc index 0b61c0c..24dc52c 100644 --- a/chrome/browser/renderer_host/pepper/pepper_talk_host.cc +++ b/chrome/browser/renderer_host/pepper/pepper_talk_host.cc @@ -41,8 +41,7 @@ ppapi::host::ReplyMessageContext GetPermissionOnUIThread( if (!render_frame_host) return reply; // RFH destroyed while task was pending. - // crbug.com/381398, crbug.com/413906 for !USE_ATHENA -#if defined(USE_ASH) && !defined(USE_ATHENA) +#if defined(USE_ASH) base::string16 title; base::string16 message; @@ -81,7 +80,7 @@ ppapi::host::ReplyMessageContext GetPermissionOnUIThread( return reply; } -#if defined(USE_ASH) && defined(OS_CHROMEOS) && !defined(USE_ATHENA) +#if defined(OS_CHROMEOS) void OnTerminateRemotingEventOnUIThread(const base::Closure& stop_callback) { content::BrowserThread::PostTask( content::BrowserThread::IO, FROM_HERE, stop_callback); @@ -101,7 +100,7 @@ ppapi::host::ReplyMessageContext StartRemotingOnUIThread( return reply; // RFH destroyed while task was pending. } -#if defined(USE_ASH) && defined(OS_CHROMEOS) && !defined(USE_ATHENA) +#if defined(OS_CHROMEOS) base::Closure stop_callback_ui_thread = base::Bind(&OnTerminateRemotingEventOnUIThread, stop_callback); @@ -117,7 +116,7 @@ ppapi::host::ReplyMessageContext StartRemotingOnUIThread( void StopRemotingOnUIThread() { DCHECK(content::BrowserThread::CurrentlyOn(content::BrowserThread::UI)); -#if defined(USE_ASH) && defined(OS_CHROMEOS) && !defined(USE_ATHENA) +#if defined(OS_CHROMEOS) if (ash::Shell::GetInstance()) { ash::Shell::GetInstance()->system_tray_notifier()->NotifyScreenShareStop(); } diff --git a/chrome/browser/sessions/session_data_deleter.cc b/chrome/browser/sessions/session_data_deleter.cc index 511c878..2d6134d7 100644 --- a/chrome/browser/sessions/session_data_deleter.cc +++ b/chrome/browser/sessions/session_data_deleter.cc @@ -148,7 +148,7 @@ void DeleteSessionOnlyData(Profile* profile) { // TODO: Remove Athena special casing once the AthenaSessionRestore is in // place. -#if defined(OS_ANDROID) || defined(USE_ATHENA) +#if defined(OS_ANDROID) SessionStartupPref::Type startup_pref_type = SessionStartupPref::GetDefaultStartupType(); #else diff --git a/chrome/browser/sessions/session_service_factory.cc b/chrome/browser/sessions/session_service_factory.cc index 9fdef7b..99a7e8b 100644 --- a/chrome/browser/sessions/session_service_factory.cc +++ b/chrome/browser/sessions/session_service_factory.cc @@ -11,8 +11,8 @@ // static SessionService* SessionServiceFactory::GetForProfile(Profile* profile) { -#if defined(OS_ANDROID) || defined(USE_ATHENA) - // For Android and Athena we do not store sessions in the SessionService. +#if defined(OS_ANDROID) + // For Android we do not store sessions in the SessionService. return NULL; #else return static_cast<SessionService*>( @@ -23,8 +23,8 @@ SessionService* SessionServiceFactory::GetForProfile(Profile* profile) { // static SessionService* SessionServiceFactory::GetForProfileIfExisting( Profile* profile) { -#if defined(OS_ANDROID) || defined(USE_ATHENA) - // For Android and Athena we do not store sessions in the SessionService. +#if defined(OS_ANDROID) + // For Android we do not store sessions in the SessionService. return NULL; #else return static_cast<SessionService*>( diff --git a/chrome/browser/ui/views/athena/chrome_browser_main_extra_parts_athena.cc b/chrome/browser/ui/views/athena/chrome_browser_main_extra_parts_athena.cc deleted file mode 100644 index f7cba3e..0000000 --- a/chrome/browser/ui/views/athena/chrome_browser_main_extra_parts_athena.cc +++ /dev/null @@ -1,86 +0,0 @@ -// Copyright 2014 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/ui/views/athena/chrome_browser_main_extra_parts_athena.h" - -#include "athena/env/public/athena_env.h" -#include "athena/main/public/athena_launcher.h" -#include "base/command_line.h" -#include "base/macros.h" -#include "chrome/browser/browser_process.h" -#include "chrome/browser/chrome_browser_main_extra_parts.h" -#include "chrome/browser/chrome_notification_types.h" -#include "chrome/browser/lifetime/application_lifetime.h" -#include "chrome/browser/profiles/profile.h" -#include "chrome/browser/profiles/profile_manager.h" -#include "chrome/browser/ui/views/select_file_dialog_extension_factory.h" -#include "chrome/common/chrome_switches.h" -#include "chromeos/chromeos_switches.h" -#include "content/public/browser/browser_thread.h" -#include "content/public/browser/notification_observer.h" -#include "content/public/browser/notification_registrar.h" -#include "content/public/browser/notification_service.h" - -namespace { - -class ChromeBrowserMainExtraPartsAthena : public ChromeBrowserMainExtraParts, - public content::NotificationObserver { - public: - ChromeBrowserMainExtraPartsAthena() { - registrar_.Add(this, - chrome::NOTIFICATION_APP_TERMINATING, - content::NotificationService::AllSources()); - } - - virtual ~ChromeBrowserMainExtraPartsAthena() {} - - private: - // Overridden from ChromeBrowserMainExtraParts: - virtual void PreProfileInit() override { - athena::StartAthenaEnv(content::BrowserThread::GetBlockingPool()-> - GetTaskRunnerWithShutdownBehavior( - base::SequencedWorkerPool::SKIP_ON_SHUTDOWN)); - - ui::SelectFileDialog::SetFactory(new SelectFileDialogExtensionFactory); - } - virtual void PostProfileInit() override { - if (!base::CommandLine::ForCurrentProcess()->HasSwitch( - switches::kDisableZeroBrowsersOpenForTests)) { - chrome::IncrementKeepAliveCount(); - } - Profile* profile = - g_browser_process->profile_manager()->GetActiveUserProfile(); - if (!base::CommandLine::ForCurrentProcess()->HasSwitch( - chromeos::switches::kLoginManager)) { - athena::CreateVirtualKeyboardWithContext(profile); - athena::StartAthenaSessionWithContext(profile); - } else { - // Only initialize virtual keyboard with login profile, user session will - // start after login. - athena::CreateVirtualKeyboardWithContext(profile); - } - } - virtual void PostMainMessageLoopRun() override { athena::ShutdownAthena(); } - - // content::NotificationObserver: - virtual void Observe(int type, - const content::NotificationSource& source, - const content::NotificationDetails& details) override { - switch (type) { - case chrome::NOTIFICATION_APP_TERMINATING: - athena::AthenaEnv::Get()->OnTerminating(); - break; - } - } - - content::NotificationRegistrar registrar_; - - DISALLOW_COPY_AND_ASSIGN(ChromeBrowserMainExtraPartsAthena); -}; - -} // namespace - -ChromeBrowserMainExtraParts* CreateChromeBrowserMainExtraPartsAthena() { - return new ChromeBrowserMainExtraPartsAthena(); -} diff --git a/chrome/browser/ui/views/athena/chrome_browser_main_extra_parts_athena.h b/chrome/browser/ui/views/athena/chrome_browser_main_extra_parts_athena.h deleted file mode 100644 index 657e3ba..0000000 --- a/chrome/browser/ui/views/athena/chrome_browser_main_extra_parts_athena.h +++ /dev/null @@ -1,14 +0,0 @@ -// Copyright 2014 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_UI_VIEWS_ATHENA_CHROME_BROWSER_MAIN_EXTRA_PARTS_ATHENA_H_ -#define CHROME_BROWSER_UI_VIEWS_ATHENA_CHROME_BROWSER_MAIN_EXTRA_PARTS_ATHENA_H_ - -class ChromeBrowserMainExtraParts; - -// Creates the BrowserMainExtraParts for athena environment. Note that athena -// and ash cannot coexist, and must be exclusive. -ChromeBrowserMainExtraParts* CreateChromeBrowserMainExtraPartsAthena(); - -#endif // CHROME_BROWSER_UI_VIEWS_ATHENA_CHROME_BROWSER_MAIN_EXTRA_PARTS_ATHENA_H_ diff --git a/chrome/chrome_browser_ui.gypi b/chrome/chrome_browser_ui.gypi index 82a8e3a..db79637 100644 --- a/chrome/chrome_browser_ui.gypi +++ b/chrome/chrome_browser_ui.gypi @@ -1261,8 +1261,6 @@ 'browser/ui/athena/extensions/extension_install_ui_factory_athena.cc', 'browser/ui/views/athena/athena_util.cc', 'browser/ui/views/athena/athena_util.h', - 'browser/ui/views/athena/chrome_browser_main_extra_parts_athena.cc', - 'browser/ui/views/athena/chrome_browser_main_extra_parts_athena.h', ], # Used when not using mobile and not using Athena. 'chrome_browser_ui_non_athena_non_mobile_sources': [ |