diff options
author | ben@chromium.org <ben@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-11-17 21:42:40 +0000 |
---|---|---|
committer | ben@chromium.org <ben@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-11-17 21:42:40 +0000 |
commit | f6d2a3ea08382ca51d1c303454b3a113bc41a367 (patch) | |
tree | ee91b676f324ffc3f2379ab5ceb5b229d2409644 | |
parent | b9476c7281446ab0ddadb696a1bc4ee969730ee8 (diff) | |
download | chromium_src-f6d2a3ea08382ca51d1c303454b3a113bc41a367.zip chromium_src-f6d2a3ea08382ca51d1c303454b3a113bc41a367.tar.gz chromium_src-f6d2a3ea08382ca51d1c303454b3a113bc41a367.tar.bz2 |
Don't build a bunch of stuff on Aura, rather than ifdefing out code in it.
BUG=none
TEST=none
Review URL: http://codereview.chromium.org/8591004
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@110567 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r-- | chrome/browser/automation/chrome_frame_automation_provider.cc | 2 | ||||
-rw-r--r-- | chrome/browser/automation/ui_controls_gtk.cc | 2 | ||||
-rw-r--r-- | chrome/browser/background/background_mode_manager_gtk.cc | 2 | ||||
-rw-r--r-- | chrome/browser/chrome_content_browser_client.cc | 2 | ||||
-rw-r--r-- | chrome/browser/chrome_plugin_message_filter.cc | 9 | ||||
-rw-r--r-- | chrome/browser/chrome_plugin_message_filter.h | 4 | ||||
-rw-r--r-- | chrome/browser/plugin_download_helper.cc | 2 | ||||
-rw-r--r-- | chrome/browser/plugin_download_helper.h | 5 | ||||
-rw-r--r-- | chrome/browser/plugin_installer_infobar_delegate.cc | 5 | ||||
-rw-r--r-- | chrome/browser/plugin_test.cc | 2 | ||||
-rw-r--r-- | chrome/browser/ui/browser_init.cc | 2 | ||||
-rw-r--r-- | chrome/chrome_browser.gypi | 42 | ||||
-rw-r--r-- | chrome/chrome_tests.gypi | 5 |
13 files changed, 46 insertions, 38 deletions
diff --git a/chrome/browser/automation/chrome_frame_automation_provider.cc b/chrome/browser/automation/chrome_frame_automation_provider.cc index 561f3b8..ce2f6a4 100644 --- a/chrome/browser/automation/chrome_frame_automation_provider.cc +++ b/chrome/browser/automation/chrome_frame_automation_provider.cc @@ -50,7 +50,7 @@ bool ChromeFrameAutomationProvider::IsValidMessage(uint32 type) { case AutomationMsg_ProcessUnhandledAccelerator::ID: case AutomationMsg_ForwardContextMenuCommandToChrome::ID: #endif // defined(OS_WIN) -#if defined(OS_WIN) && !defined(USE_AURA) +#if defined(OS_WIN) case AutomationMsg_TabReposition::ID: #endif case AutomationMsg_NavigateInExternalTab::ID: diff --git a/chrome/browser/automation/ui_controls_gtk.cc b/chrome/browser/automation/ui_controls_gtk.cc index 1505b73..0ca2378 100644 --- a/chrome/browser/automation/ui_controls_gtk.cc +++ b/chrome/browser/automation/ui_controls_gtk.cc @@ -292,7 +292,7 @@ void SynchronizeWidgetSize(views::Widget* widget) { void MoveMouseToCenterAndPress(views::View* view, MouseButton button, int state, const base::Closure& task) { -#if defined(OS_LINUX) && !defined(USE_AURA) +#if defined(OS_LINUX) // X is asynchronous and we need to wait until the window gets // resized to desired size. SynchronizeWidgetSize(view->GetWidget()); diff --git a/chrome/browser/background/background_mode_manager_gtk.cc b/chrome/browser/background/background_mode_manager_gtk.cc index c6ae8a4..e9d193e 100644 --- a/chrome/browser/background/background_mode_manager_gtk.cc +++ b/chrome/browser/background/background_mode_manager_gtk.cc @@ -87,10 +87,8 @@ void BackgroundModeManager::DisplayAppInstalledNotification( } string16 BackgroundModeManager::GetPreferencesMenuLabel() { -#if !defined(USE_AURA) string16 result = gtk_util::GetStockPreferencesMenuLabel(); if (!result.empty()) return result; -#endif return l10n_util::GetStringUTF16(IDS_PREFERENCES); } diff --git a/chrome/browser/chrome_content_browser_client.cc b/chrome/browser/chrome_content_browser_client.cc index 5c821bb..46a9e2f 100644 --- a/chrome/browser/chrome_content_browser_client.cc +++ b/chrome/browser/chrome_content_browser_client.cc @@ -329,7 +329,9 @@ void ChromeContentBrowserClient::BrowserRenderProcessHostCreated( void ChromeContentBrowserClient::PluginProcessHostCreated( PluginProcessHost* host) { +#if !defined(USE_AURA) host->AddFilter(new ChromePluginMessageFilter(host)); +#endif } content::WebUIFactory* ChromeContentBrowserClient::GetWebUIFactory() { diff --git a/chrome/browser/chrome_plugin_message_filter.cc b/chrome/browser/chrome_plugin_message_filter.cc index f879259..7c0c2da 100644 --- a/chrome/browser/chrome_plugin_message_filter.cc +++ b/chrome/browser/chrome_plugin_message_filter.cc @@ -7,7 +7,6 @@ #include "base/bind.h" #include "chrome/browser/browser_process.h" #include "chrome/browser/infobars/infobar_tab_helper.h" -#include "chrome/browser/plugin_download_helper.h" #include "chrome/browser/plugin_installer_infobar_delegate.h" #include "chrome/browser/plugin_observer.h" #include "chrome/browser/profiles/profile.h" @@ -21,6 +20,10 @@ #include "net/url_request/url_request_context_getter.h" #include "webkit/plugins/npapi/default_plugin_shared.h" +#if defined(OS_WIN) +#include "chrome/browser/plugin_download_helper.h" +#endif + using content::BrowserThread; static const char kDefaultPluginFinderURL[] = @@ -36,7 +39,7 @@ ChromePluginMessageFilter::~ChromePluginMessageFilter() { bool ChromePluginMessageFilter::OnMessageReceived(const IPC::Message& message) { bool handled = true; IPC_BEGIN_MESSAGE_MAP(ChromePluginMessageFilter, message) -#if defined(OS_WIN) && !defined(USE_AURA) +#if defined(OS_WIN) IPC_MESSAGE_HANDLER(ChromePluginProcessHostMsg_DownloadUrl, OnDownloadUrl) #endif IPC_MESSAGE_HANDLER(ChromePluginProcessHostMsg_GetPluginFinderUrl, @@ -53,7 +56,7 @@ bool ChromePluginMessageFilter::Send(IPC::Message* message) { return process_->Send(message); } -#if defined(OS_WIN) && !defined(USE_AURA) +#if defined(OS_WIN) void ChromePluginMessageFilter::OnDownloadUrl(const std::string& url, gfx::NativeWindow caller_window, int render_process_id) { diff --git a/chrome/browser/chrome_plugin_message_filter.h b/chrome/browser/chrome_plugin_message_filter.h index 3243a33..2f02452 100644 --- a/chrome/browser/chrome_plugin_message_filter.h +++ b/chrome/browser/chrome_plugin_message_filter.h @@ -20,7 +20,7 @@ class URLRequestContextGetter; class ChromePluginMessageFilter : public IPC::ChannelProxy::MessageFilter, public IPC::Message::Sender { public: - ChromePluginMessageFilter(PluginProcessHost* process); + explicit ChromePluginMessageFilter(PluginProcessHost* process); // BrowserMessageFilter methods: virtual bool OnMessageReceived(const IPC::Message& message); @@ -31,7 +31,7 @@ class ChromePluginMessageFilter : public IPC::ChannelProxy::MessageFilter, private: virtual ~ChromePluginMessageFilter(); -#if defined(OS_WIN) && !defined(USE_AURA) +#if defined(OS_WIN) void OnDownloadUrl(const std::string& url, gfx::NativeWindow caller_window, int render_process_id); diff --git a/chrome/browser/plugin_download_helper.cc b/chrome/browser/plugin_download_helper.cc index d522dd8..0621a6a 100644 --- a/chrome/browser/plugin_download_helper.cc +++ b/chrome/browser/plugin_download_helper.cc @@ -4,7 +4,6 @@ #include "chrome/browser/plugin_download_helper.h" -#if defined(OS_WIN) && !defined(USE_AURA) #include <windows.h> #include "base/file_util.h" @@ -82,4 +81,3 @@ void PluginDownloadUrlHelper::OnURLFetchComplete( delete this; } -#endif // defined(OS_WIN) && !defined(USE_AURA) diff --git a/chrome/browser/plugin_download_helper.h b/chrome/browser/plugin_download_helper.h index 96d3cd3..18d3f8f 100644 --- a/chrome/browser/plugin_download_helper.h +++ b/chrome/browser/plugin_download_helper.h @@ -7,9 +7,8 @@ #pragma once #include <string> -#include "build/build_config.h" -#if defined(OS_WIN) +#include "build/build_config.h" #include "base/file_path.h" #include "base/message_loop_proxy.h" #include "content/public/common/url_fetcher_delegate.h" @@ -64,6 +63,4 @@ class PluginDownloadUrlHelper : public content::URLFetcherDelegate { DISALLOW_COPY_AND_ASSIGN(PluginDownloadUrlHelper); }; -#endif // OS_WIN - #endif // CHROME_BROWSER_PLUGIN_DOWNLOAD_HELPER_H_ diff --git a/chrome/browser/plugin_installer_infobar_delegate.cc b/chrome/browser/plugin_installer_infobar_delegate.cc index a99070c..02b8f2d 100644 --- a/chrome/browser/plugin_installer_infobar_delegate.cc +++ b/chrome/browser/plugin_installer_infobar_delegate.cc @@ -50,14 +50,11 @@ string16 PluginInstallerInfoBarDelegate::GetButtonLabel( bool PluginInstallerInfoBarDelegate::Accept() { // TODO(PORT) for other platforms. -#if defined(OS_WIN) && !defined(USE_AURA) +#if defined(OS_WIN) ::PostMessage(window_, webkit::npapi::default_plugin::kInstallMissingPluginMessage, 0, 0); -#elif defined(USE_AURA) - // TODO(beng): - NOTIMPLEMENTED(); #endif return true; } diff --git a/chrome/browser/plugin_test.cc b/chrome/browser/plugin_test.cc index a64a661..00c3fdd 100644 --- a/chrome/browser/plugin_test.cc +++ b/chrome/browser/plugin_test.cc @@ -32,7 +32,6 @@ #include "base/message_loop.h" #include "base/path_service.h" #include "base/test/test_timeouts.h" -#include "chrome/browser/plugin_download_helper.h" #include "chrome/common/chrome_switches.h" #include "chrome/common/chrome_paths.h" #include "chrome/test/automation/automation_proxy.h" @@ -50,6 +49,7 @@ #if defined(OS_WIN) #include "base/win/registry.h" +#include "chrome/browser/plugin_download_helper.h" #endif class PluginTest : public UITest { diff --git a/chrome/browser/ui/browser_init.cc b/chrome/browser/ui/browser_init.cc index 3b6645c..79498ba 100644 --- a/chrome/browser/ui/browser_init.cc +++ b/chrome/browser/ui/browser_init.cc @@ -1054,7 +1054,7 @@ Browser* BrowserInit::LaunchWithProfile::OpenTabsInBrowser( if (!browser || !browser->is_type_tabbed()) { browser = Browser::Create(profile_); } else { -#if defined(TOOLKIT_GTK) && !defined(USE_AURA) +#if defined(TOOLKIT_GTK) // Setting the time of the last action on the window here allows us to steal // focus, which is what the user wants when opening a new tab in an existing // browser window. diff --git a/chrome/chrome_browser.gypi b/chrome/chrome_browser.gypi index a2b6fc7..697d885 100644 --- a/chrome/chrome_browser.gypi +++ b/chrome/chrome_browser.gypi @@ -4149,19 +4149,6 @@ ['exclude', '^browser/chromeos/input_method/candidate_window.h'], ], }], - # For now, always include status area code for aura builds, even - # though the code is under browser/chromeos. - # TODO: (stevenjb/beng): Find a home for these. - ['use_aura==1', { - 'sources/': [ - ['include', '^browser/chromeos/status/clock_menu_button.cc'], - ['include', '^browser/chromeos/status/clock_menu_button.h'], - ['include', '^browser/chromeos/status/status_area_button.cc'], - ['include', '^browser/chromeos/status/status_area_button.h'], - ['include', '^browser/chromeos/status/status_area_view.cc'], - ['include', '^browser/chromeos/status/status_area_view.h'], - ], - }], # linux/chromeos only status area button. ['OS=="linux" and use_aura==1', { 'sources/': [ @@ -4173,7 +4160,11 @@ 'sources/': [ ['exclude', '^browser/aeropeek_manager.cc'], ['exclude', '^browser/automation/automation_provider_win.cc'], + ['exclude', '^browser/automation/chrome_frame_automation_provider.cc'], + ['exclude', '^browser/automation/chrome_frame_automation_provider.h'], ['exclude', '^browser/automation/testing_automation_provider_win.cc'], + ['exclude', '^browser/chrome_plugin_message_filter.cc'], + ['exclude', '^browser/chrome_plugin_message_filter.h'], ['exclude', '^browser/chromeos/native_dialog_window.cc'], ['exclude', '^browser/chromeos/native_dialog_window.h'], ['exclude', '^browser/external_tab_container_win.cc'], @@ -4185,6 +4176,10 @@ ['exclude', '^browser/google/google_update.h'], ['exclude', '^browser/hang_monitor/'], ['exclude', '^browser/platform_util_win.cc'], + ['exclude', '^browser/plugin_download_helper.cc'], + ['exclude', '^browser/plugin_download_helper.h'], + ['exclude', '^browser/plugin_installer_infobar_delegate.cc'], + ['exclude', '^browser/plugin_installer_infobar_delegate.h'], ['exclude', '^browser/renderer_host/render_widget_host_view_views*'], ['exclude', '^browser/tab_contents/web_drag_source_win.cc'], ['exclude', '^browser/tab_contents/web_drag_source_win.h'], @@ -4214,8 +4209,6 @@ ['exclude', '^browser/ui/views/omnibox/omnibox_view_win.cc'], ['exclude', '^browser/ui/views/omnibox/omnibox_view_win.h'], ['exclude', '^browser/ui/views/select_file_dialog_win.cc'], - ['include', '^browser/ui/views/simple_message_box_views.cc'], - ['include', '^browser/ui/views/simple_message_box_views.h'], ['exclude', '^browser/ui/views/simple_message_box_win.cc'], ['exclude', '^browser/ui/views/ssl_client_certificate_selector.cc'], ['exclude', '^browser/ui/views/tab_contents/native_tab_contents_container_views*'], @@ -4232,6 +4225,19 @@ ['exclude', '^browser/ui/views/task_manager_view.cc'], ['exclude', '^browser/ui/views/task_manager_view.h'], ['exclude', '^browser/ui/views/user_data_dir_dialog.cc'], + ['exclude', '^browser/ui/window_sizer_win.cc'], + ['exclude', '^browser/ui/window_snapshot/window_snapshot_win.cc'], + # For now, always include status area code for aura builds, even + # though the code is under browser/chromeos. + # TODO: (stevenjb/beng): Find a home for these. + ['include', '^browser/chromeos/status/clock_menu_button.cc'], + ['include', '^browser/chromeos/status/clock_menu_button.h'], + ['include', '^browser/chromeos/status/status_area_button.cc'], + ['include', '^browser/chromeos/status/status_area_button.h'], + ['include', '^browser/chromeos/status/status_area_view.cc'], + ['include', '^browser/chromeos/status/status_area_view.h'], + ['include', '^browser/ui/views/simple_message_box_views.cc'], + ['include', '^browser/ui/views/simple_message_box_views.h'], ['include', '^browser/ui/webui/certificate_viewer_webui.cc'], ['include', '^browser/ui/webui/certificate_viewer_webui.h'], ['include', '^browser/ui/webui/certificate_viewer_ui.cc'], @@ -4240,8 +4246,6 @@ ['include', '^browser/ui/webui/collected_cookies_ui_delegate.h'], ['include', '^browser/ui/webui/cookies_tree_model_adapter.cc'], ['include', '^browser/ui/webui/cookies_tree_model_adapter.h'], - ['exclude', '^browser/ui/window_sizer_win.cc'], - ['exclude', '^browser/ui/window_snapshot/window_snapshot_win.cc'], ], 'dependencies': [ '../ui/aura_shell/aura_shell.gyp:aura_shell', @@ -4589,6 +4593,10 @@ # Exclude try chrome dialog. ['exclude', '^browser/first_run/try_chrome_dialog_view.cc'], ['exclude', '^browser/first_run/try_chrome_dialog_view.h'], + + # Exclude plugin download helper. + ['exclude', '^browser/plugin_download_helper.cc'], + ['exclude', '^browser/plugin_download_helper.h'], ], 'conditions': [ ['OS=="linux" or use_aura==1',{ diff --git a/chrome/chrome_tests.gypi b/chrome/chrome_tests.gypi index 3ea0c3c..701372d 100644 --- a/chrome/chrome_tests.gypi +++ b/chrome/chrome_tests.gypi @@ -2063,6 +2063,11 @@ '../content/renderer/p2p/p2p_transport_impl_unittest.cc', ], }], + ['use_aura==1', { + 'sources/': [ + ['exclude', '^browser/automation/automation_provider_unittest.cc'], + ], + }], ['touchui==0', { 'sources/': [ ['exclude', '^browser/ui/touch/'], |