diff options
author | erg@chromium.org <erg@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-06-16 17:54:42 +0000 |
---|---|---|
committer | erg@chromium.org <erg@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-06-16 17:54:42 +0000 |
commit | 3e28d46ea1840c9d4dc451271dd7e6d3b510fc50 (patch) | |
tree | 3948ccfeadce3648a6bb33f55e867ea573b63b91 | |
parent | ad369b0ad05a6de7b9e44dfa4c01df5a17884aef (diff) | |
download | chromium_src-3e28d46ea1840c9d4dc451271dd7e6d3b510fc50.zip chromium_src-3e28d46ea1840c9d4dc451271dd7e6d3b510fc50.tar.gz chromium_src-3e28d46ea1840c9d4dc451271dd7e6d3b510fc50.tar.bz2 |
Start removing USE_ASH.
BUG=375466
Review URL: https://codereview.chromium.org/294053005
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@277485 0039d316-1c4b-4281-b951-d872f2087c98
20 files changed, 29 insertions, 124 deletions
diff --git a/chrome/browser/ui/views/chrome_views_delegate.h b/chrome/browser/ui/views/chrome_views_delegate.h index 4ff83d5..454a8ef 100644 --- a/chrome/browser/ui/views/chrome_views_delegate.h +++ b/chrome/browser/ui/views/chrome_views_delegate.h @@ -39,10 +39,9 @@ class ChromeViewsDelegate : public views::ViewsDelegate { #elif defined(OS_LINUX) && !defined(OS_CHROMEOS) virtual gfx::ImageSkia* GetDefaultWindowIcon() const OVERRIDE; #endif -#if defined(USE_ASH) + virtual views::NonClientFrameView* CreateDefaultNonClientFrameView( views::Widget* widget) OVERRIDE; -#endif virtual void AddRef() OVERRIDE; virtual void ReleaseRef() OVERRIDE; virtual void OnBeforeWidgetInit( diff --git a/chrome/browser/ui/views/chrome_views_delegate_aura.cc b/chrome/browser/ui/views/chrome_views_delegate_aura.cc index 0fee65e..f2691c5 100644 --- a/chrome/browser/ui/views/chrome_views_delegate_aura.cc +++ b/chrome/browser/ui/views/chrome_views_delegate_aura.cc @@ -9,11 +9,10 @@ views::Widget::InitParams::WindowOpacity ChromeViewsDelegate::GetOpacityForInitParams( const views::Widget::InitParams& params) { -#if defined(USE_ASH) gfx::NativeView native_view = params.parent ? params.parent : params.context; if (native_view && chrome::IsNativeViewInAsh(native_view)) return views::Widget::InitParams::TRANSLUCENT_WINDOW; -#endif + // We want translucent windows when either we are in ASH or we are // a top level window which is not of type TYPE_WINDOW. if (!params.child && params.type != views::Widget::InitParams::TYPE_WINDOW) diff --git a/chrome/browser/ui/views/color_chooser_win.cc b/chrome/browser/ui/views/color_chooser_win.cc index d4f07c1..8014454 100644 --- a/chrome/browser/ui/views/color_chooser_win.cc +++ b/chrome/browser/ui/views/color_chooser_win.cc @@ -7,6 +7,7 @@ #include "chrome/browser/platform_util.h" #include "chrome/browser/ui/browser_dialogs.h" #include "chrome/browser/ui/host_desktop.h" +#include "chrome/browser/ui/views/color_chooser_aura.h" #include "chrome/browser/ui/views/color_chooser_dialog.h" #include "content/public/browser/color_chooser.h" #include "content/public/browser/render_view_host.h" @@ -14,10 +15,6 @@ #include "content/public/browser/web_contents.h" #include "ui/views/color_chooser/color_chooser_listener.h" -#if defined(USE_ASH) -#include "chrome/browser/ui/views/color_chooser_aura.h" -#endif - class ColorChooserWin : public content::ColorChooser, public views::ColorChooserListener { public: @@ -102,11 +99,10 @@ namespace chrome { content::ColorChooser* ShowColorChooser(content::WebContents* web_contents, SkColor initial_color) { -#if defined(USE_ASH) gfx::NativeView native_view = web_contents->GetNativeView(); if (GetHostDesktopTypeForNativeView(native_view) == HOST_DESKTOP_TYPE_ASH) return ColorChooserAura::Open(web_contents, initial_color); -#endif + return ColorChooserWin::Open(web_contents, initial_color); } diff --git a/chrome/browser/ui/views/detachable_toolbar_view.cc b/chrome/browser/ui/views/detachable_toolbar_view.cc index b57e104..5272d8f 100644 --- a/chrome/browser/ui/views/detachable_toolbar_view.cc +++ b/chrome/browser/ui/views/detachable_toolbar_view.cc @@ -34,7 +34,7 @@ void DetachableToolbarView::PaintBackgroundAttachedMode( canvas->TileImageInt(*theme_provider->GetImageSkiaNamed(IDR_THEME_TOOLBAR), background_origin.x(), background_origin.y(), bounds.x(), bounds.y(), bounds.width(), bounds.height()); -#if defined(USE_ASH) + if (host_desktop_type == chrome::HOST_DESKTOP_TYPE_ASH) { // Ash provides additional lightening at the edges of the toolbar. gfx::ImageSkia* toolbar_left = @@ -48,7 +48,6 @@ void DetachableToolbarView::PaintBackgroundAttachedMode( bounds.right() - toolbar_right->width(), bounds.y(), toolbar_right->width(), bounds.height()); } -#endif } // static diff --git a/chrome/browser/ui/views/extensions/extension_uninstall_dialog_view.cc b/chrome/browser/ui/views/extensions/extension_uninstall_dialog_view.cc index 6c97fe4..d6d3a8c 100644 --- a/chrome/browser/ui/views/extensions/extension_uninstall_dialog_view.cc +++ b/chrome/browser/ui/views/extensions/extension_uninstall_dialog_view.cc @@ -24,10 +24,6 @@ #include "ui/views/widget/widget.h" #include "ui/views/window/dialog_delegate.h" -#if defined(USE_ASH) -#include "ash/shell.h" -#endif - namespace { const int kRightColumnWidth = 210; diff --git a/chrome/browser/ui/views/frame/browser_frame.cc b/chrome/browser/ui/views/frame/browser_frame.cc index 65258f3..fe365b2 100644 --- a/chrome/browser/ui/views/frame/browser_frame.cc +++ b/chrome/browser/ui/views/frame/browser_frame.cc @@ -11,6 +11,7 @@ #include "chrome/browser/app_mode/app_mode_utils.h" #include "chrome/browser/themes/theme_service.h" #include "chrome/browser/themes/theme_service_factory.h" +#include "chrome/browser/ui/ash/ash_init.h" #include "chrome/browser/ui/browser.h" #include "chrome/browser/ui/browser_list.h" #include "chrome/browser/ui/browser_window_state.h" @@ -39,10 +40,6 @@ #include "chrome/browser/shell_integration_linux.h" #endif -#if defined(USE_ASH) -#include "chrome/browser/ui/ash/ash_init.h" -#endif - #if defined(OS_CHROMEOS) #include "ash/session/session_state_delegate.h" #endif @@ -103,7 +100,7 @@ void BrowserFrame::InitBrowserFrame() { ¶ms.bounds, ¶ms.show_state); } -#if defined(USE_ASH) + if (browser_view_->browser()->host_desktop_type() == chrome::HOST_DESKTOP_TYPE_ASH || chrome::ShouldOpenAshOnStartup()) { params.context = ash::Shell::GetPrimaryRootWindow(); @@ -112,7 +109,6 @@ void BrowserFrame::InitBrowserFrame() { params.opacity = views::Widget::InitParams::TRANSLUCENT_WINDOW; #endif } -#endif #if defined(OS_LINUX) && !defined(OS_CHROMEOS) // Set up a custom WM_CLASS for some sorts of window types. This allows diff --git a/chrome/browser/ui/views/frame/browser_non_client_frame_view_factory_aura.cc b/chrome/browser/ui/views/frame/browser_non_client_frame_view_factory_aura.cc index dd411c7..02b2b4e 100644 --- a/chrome/browser/ui/views/frame/browser_non_client_frame_view_factory_aura.cc +++ b/chrome/browser/ui/views/frame/browser_non_client_frame_view_factory_aura.cc @@ -5,11 +5,8 @@ #include "chrome/browser/ui/views/frame/browser_view.h" #include "base/command_line.h" -#include "chrome/browser/ui/views/frame/opaque_browser_frame_view.h" - -#if defined(USE_ASH) #include "chrome/browser/ui/views/frame/browser_non_client_frame_view_ash.h" -#endif +#include "chrome/browser/ui/views/frame/opaque_browser_frame_view.h" #if defined(OS_WIN) #include "chrome/browser/ui/views/frame/glass_browser_frame_view.h" @@ -19,7 +16,7 @@ namespace chrome { BrowserNonClientFrameView* CreateBrowserNonClientFrameView( BrowserFrame* frame, BrowserView* browser_view) { -#if defined(USE_AURA) && !defined(OS_CHROMEOS) +#if !defined(OS_CHROMEOS) if (browser_view->browser()-> host_desktop_type() == chrome::HOST_DESKTOP_TYPE_NATIVE) { #if defined(OS_WIN) @@ -29,14 +26,11 @@ BrowserNonClientFrameView* CreateBrowserNonClientFrameView( return new OpaqueBrowserFrameView(frame, browser_view); } #endif -#if defined(USE_ASH) + BrowserNonClientFrameViewAsh* frame_view = new BrowserNonClientFrameViewAsh(frame, browser_view); frame_view->Init(); return frame_view; -#else - return new OpaqueBrowserFrameView(frame, browser_view); -#endif } } // namespace chrome diff --git a/chrome/browser/ui/views/frame/browser_view.cc b/chrome/browser/ui/views/frame/browser_view.cc index a467ff2..f91d36d 100644 --- a/chrome/browser/ui/views/frame/browser_view.cc +++ b/chrome/browser/ui/views/frame/browser_view.cc @@ -902,11 +902,10 @@ void BrowserView::UpdateFullscreenExitBubbleContent( } bool BrowserView::ShouldHideUIForFullscreen() const { -#if defined(USE_ASH) // Immersive mode needs UI for the slide-down top panel. if (immersive_mode_controller_->IsEnabled()) return false; -#endif + return IsFullscreen(); } diff --git a/chrome/browser/ui/views/frame/browser_window_property_manager_browsertest_win.cc b/chrome/browser/ui/views/frame/browser_window_property_manager_browsertest_win.cc index df48a96d..1d905c4d 100644 --- a/chrome/browser/ui/views/frame/browser_window_property_manager_browsertest_win.cc +++ b/chrome/browser/ui/views/frame/browser_window_property_manager_browsertest_win.cc @@ -176,11 +176,9 @@ class BrowserTestWithProfileShortcutManager : public InProcessBrowserTest { // Check that the window properties on Windows are properly set. IN_PROC_BROWSER_TEST_F(BrowserTestWithProfileShortcutManager, WindowProperties) { -#if defined(USE_ASH) // Disable this test in Metro+Ash where Windows window properties aren't used. if (CommandLine::ForCurrentProcess()->HasSwitch(switches::kAshBrowserTests)) return; -#endif // This test checks HWND properties that are only available on Win7+. if (base::win::GetVersion() < base::win::VERSION_WIN7) diff --git a/chrome/browser/ui/views/frame/immersive_mode_controller.h b/chrome/browser/ui/views/frame/immersive_mode_controller.h index 807289f..6f24ddd 100644 --- a/chrome/browser/ui/views/frame/immersive_mode_controller.h +++ b/chrome/browser/ui/views/frame/immersive_mode_controller.h @@ -5,14 +5,11 @@ #ifndef CHROME_BROWSER_UI_VIEWS_FRAME_IMMERSIVE_MODE_CONTROLLER_H_ #define CHROME_BROWSER_UI_VIEWS_FRAME_IMMERSIVE_MODE_CONTROLLER_H_ +#include "ash/wm/immersive_revealed_lock.h" #include "base/compiler_specific.h" #include "base/observer_list.h" #include "chrome/browser/ui/host_desktop.h" -#if defined(USE_ASH) -#include "ash/wm/immersive_revealed_lock.h" -#endif - class BrowserView; namespace gfx { @@ -20,16 +17,7 @@ class Rect; class Size; } -#if defined(USE_ASH) typedef ash::ImmersiveRevealedLock ImmersiveRevealedLock; -#else -// Do nothing version of ash::ImmersiveRevealedLock. -class ImmersiveRevealedLock { - public: - ImmersiveRevealedLock() {} - ~ImmersiveRevealedLock() {} -}; -#endif // Controller for an "immersive mode" similar to MacOS presentation mode where // the top-of-window views are hidden until the mouse hits the top of the diff --git a/chrome/browser/ui/views/frame/immersive_mode_controller_factory.cc b/chrome/browser/ui/views/frame/immersive_mode_controller_factory.cc index 99549a4..7edd140 100644 --- a/chrome/browser/ui/views/frame/immersive_mode_controller_factory.cc +++ b/chrome/browser/ui/views/frame/immersive_mode_controller_factory.cc @@ -4,19 +4,14 @@ #include "chrome/browser/ui/host_desktop.h" #include "chrome/browser/ui/views/frame/immersive_mode_controller_stub.h" - -#if defined(USE_ASH) #include "chrome/browser/ui/views/frame/immersive_mode_controller_ash.h" -#endif namespace chrome { ImmersiveModeController* CreateImmersiveModeController( chrome::HostDesktopType host_desktop_type) { -#if defined(USE_ASH) if (host_desktop_type == chrome::HOST_DESKTOP_TYPE_ASH) return new ImmersiveModeControllerAsh(); -#endif return new ImmersiveModeControllerStub(); } diff --git a/chrome/browser/ui/views/frame/native_browser_frame_factory_auralinux.cc b/chrome/browser/ui/views/frame/native_browser_frame_factory_auralinux.cc index 27e65e8..110fe69 100644 --- a/chrome/browser/ui/views/frame/native_browser_frame_factory_auralinux.cc +++ b/chrome/browser/ui/views/frame/native_browser_frame_factory_auralinux.cc @@ -4,18 +4,14 @@ #include "chrome/browser/ui/views/frame/native_browser_frame_factory.h" -#include "chrome/browser/ui/views/frame/desktop_browser_frame_aura.h" - -#if defined(USE_ASH) #include "chrome/browser/ui/views/frame/browser_frame_ash.h" -#endif +#include "chrome/browser/ui/views/frame/desktop_browser_frame_aura.h" NativeBrowserFrame* NativeBrowserFrameFactory::Create( BrowserFrame* browser_frame, BrowserView* browser_view) { -#if defined(USE_ASH) if (ShouldCreateForAshDesktop(browser_view)) return new BrowserFrameAsh(browser_frame, browser_view); -#endif + return new DesktopBrowserFrameAura(browser_frame, browser_view); } diff --git a/chrome/browser/ui/views/frame/native_browser_frame_factory_aurawin.cc b/chrome/browser/ui/views/frame/native_browser_frame_factory_aurawin.cc index 762ee72..8b20e3a 100644 --- a/chrome/browser/ui/views/frame/native_browser_frame_factory_aurawin.cc +++ b/chrome/browser/ui/views/frame/native_browser_frame_factory_aurawin.cc @@ -4,30 +4,24 @@ #include "chrome/browser/ui/views/frame/native_browser_frame_factory.h" -#include "chrome/browser/ui/views/frame/desktop_browser_frame_aura.h" - -#if defined(USE_ASH) #include "ash/shell.h" #include "chrome/browser/ui/views/frame/browser_frame_ashwin.h" -#endif +#include "chrome/browser/ui/views/frame/desktop_browser_frame_aura.h" NativeBrowserFrame* NativeBrowserFrameFactory::Create( BrowserFrame* browser_frame, BrowserView* browser_view) { -#if defined(USE_ASH) if (ShouldCreateForAshDesktop(browser_view)) return new BrowserFrameAshWin(browser_frame, browser_view); -#endif + return new DesktopBrowserFrameAura(browser_frame, browser_view); } // static chrome::HostDesktopType NativeBrowserFrameFactory::AdjustHostDesktopType( chrome::HostDesktopType desktop_type) { -#if defined(USE_ASH) if (ash::Shell::HasInstance()) return chrome::HOST_DESKTOP_TYPE_ASH; -#endif return desktop_type; } diff --git a/chrome/browser/ui/views/profiles/user_manager_view.cc b/chrome/browser/ui/views/profiles/user_manager_view.cc index e52f9ce..c950faa 100644 --- a/chrome/browser/ui/views/profiles/user_manager_view.cc +++ b/chrome/browser/ui/views/profiles/user_manager_view.cc @@ -21,10 +21,6 @@ #include "ui/views/view.h" #include "ui/views/widget/widget.h" -#if defined(USE_ASH) -#include "ash/wm/window_util.h" -#endif - #if defined(OS_WIN) #include "chrome/browser/shell_integration.h" #include "ui/base/win/shell.h" diff --git a/chrome/browser/ui/views/screen_capture_notification_ui_views.cc b/chrome/browser/ui/views/screen_capture_notification_ui_views.cc index f70d3ce..d46833e 100644 --- a/chrome/browser/ui/views/screen_capture_notification_ui_views.cc +++ b/chrome/browser/ui/views/screen_capture_notification_ui_views.cc @@ -177,13 +177,11 @@ gfx::NativeViewId ScreenCaptureNotificationUIViews::OnStarted( params.remove_standard_frame = true; params.keep_on_top = true; -#if defined(USE_ASH) // TODO(sergeyu): The notification bar must be shown on the monitor that's // being captured. Make sure it's always the case. Currently we always capture // the primary monitor. if (ash::Shell::HasInstance()) params.context = ash::Shell::GetPrimaryRootWindow(); -#endif widget->set_frame_type(views::Widget::FRAME_TYPE_FORCE_CUSTOM); widget->Init(params); diff --git a/chrome/browser/ui/views/status_bubble_views.cc b/chrome/browser/ui/views/status_bubble_views.cc index c566ea7..196915e 100644 --- a/chrome/browser/ui/views/status_bubble_views.cc +++ b/chrome/browser/ui/views/status_bubble_views.cc @@ -6,6 +6,7 @@ #include <algorithm> +#include "ash/wm/window_state.h" #include "base/bind.h" #include "base/i18n/rtl.h" #include "base/message_loop/message_loop.h" @@ -35,10 +36,6 @@ #include "ui/views/widget/widget.h" #include "url/gurl.h" -#if defined(USE_ASH) -#include "ash/wm/window_state.h" -#endif - // The alpha and color of the bubble's shadow. static const SkColor kShadowColor = SkColorSetARGB(30, 0, 0, 0); @@ -614,10 +611,8 @@ void StatusBubbleViews::Init() { popup_->SetVisibilityChangedAnimationsEnabled(false); popup_->SetOpacity(0x00); popup_->SetContentsView(view_); -#if defined(USE_ASH) ash::wm::GetWindowState(popup_->GetNativeWindow())-> set_ignored_by_shelf(true); -#endif RepositionPopup(); } } @@ -626,12 +621,6 @@ void StatusBubbleViews::Reposition() { // In restored mode, the client area has a client edge between it and the // frame. int overlap = kShadowThickness; - // The extra pixels defined by kClientEdgeThickness is only drawn in frame - // content border on windows for non-aura build. -#if !defined(USE_ASH) - overlap += - IsFrameMaximized() ? 0 : views::NonClientFrameView::kClientEdgeThickness; -#endif int height = GetPreferredSize().height(); int base_view_height = base_view()->bounds().height(); gfx::Point origin(-overlap, base_view_height - height + overlap); diff --git a/chrome/browser/ui/views/tabs/tab.cc b/chrome/browser/ui/views/tabs/tab.cc index 6183b4d..ab82c03 100644 --- a/chrome/browser/ui/views/tabs/tab.cc +++ b/chrome/browser/ui/views/tabs/tab.cc @@ -25,6 +25,7 @@ #include "grit/ui_resources.h" #include "third_party/skia/include/effects/SkGradientShader.h" #include "ui/accessibility/ax_view_state.h" +#include "ui/aura/env.h" #include "ui/base/l10n/l10n_util.h" #include "ui/base/models/list_selection_model.h" #include "ui/base/resource/resource_bundle.h" @@ -48,10 +49,6 @@ #include "ui/views/widget/widget.h" #include "ui/views/window/non_client_view.h" -#if defined(USE_ASH) -#include "ui/aura/env.h" -#endif - namespace { // Padding around the "content" of a tab, occupied by the tab border graphics. @@ -248,16 +245,9 @@ class Tab::TabCloseButton : public views::ImageButton { gfx::Rect contents_bounds = GetContentsBounds(); contents_bounds.set_x(GetMirroredXForRect(contents_bounds)); - // TODO(tdanderson): Remove this ifdef if rect-based targeting - // is turned on by default. -#if defined(USE_ASH) // Include the padding in hit-test for touch events. if (aura::Env::GetInstance()->is_touch_down()) contents_bounds = GetLocalBounds(); -#elif defined(OS_WIN) - // TODO(sky): Use local-bounds if a touch-point is active. - // http://crbug.com/145258 -#endif return contents_bounds.Intersects(rect) ? this : parent(); } diff --git a/chrome/browser/ui/views/tabs/tab_drag_controller.cc b/chrome/browser/ui/views/tabs/tab_drag_controller.cc index 54f836d1..9ce7433 100644 --- a/chrome/browser/ui/views/tabs/tab_drag_controller.cc +++ b/chrome/browser/ui/views/tabs/tab_drag_controller.cc @@ -7,6 +7,9 @@ #include <math.h> #include <set> +#include "ash/accelerators/accelerator_commands.h" +#include "ash/wm/coordinate_conversion.h" +#include "ash/wm/window_state.h" #include "base/auto_reset.h" #include "base/callback.h" #include "base/command_line.h" @@ -35,9 +38,13 @@ #include "content/public/browser/web_contents.h" #include "extensions/browser/extension_function_dispatcher.h" #include "ui/aura/env.h" +#include "ui/aura/env.h" +#include "ui/aura/window.h" +#include "ui/aura/window_event_dispatcher.h" #include "ui/base/resource/resource_bundle.h" #include "ui/events/event_constants.h" #include "ui/events/event_utils.h" +#include "ui/events/gestures/gesture_recognizer.h" #include "ui/gfx/geometry/point_conversions.h" #include "ui/gfx/screen.h" #include "ui/views/focus/view_storage.h" @@ -45,16 +52,6 @@ #include "ui/views/widget/widget.h" #include "ui/wm/core/window_modality_controller.h" -#if defined(USE_ASH) -#include "ash/accelerators/accelerator_commands.h" -#include "ash/wm/coordinate_conversion.h" -#include "ash/wm/window_state.h" -#include "ui/aura/env.h" -#include "ui/aura/window.h" -#include "ui/aura/window_event_dispatcher.h" -#include "ui/events/gestures/gesture_recognizer.h" -#endif - #if defined(OS_WIN) #include "ui/aura/window.h" #include "ui/events/gestures/gesture_recognizer.h" @@ -86,21 +83,15 @@ const int kHorizontalMoveThreshold = 16; // Pixels. const int kStackedDistance = 36; void SetWindowPositionManaged(gfx::NativeWindow window, bool value) { -#if defined(USE_ASH) ash::wm::GetWindowState(window)->set_window_position_managed(value); -#endif } // Returns true if |tab_strip| browser window is docked. bool IsDockedOrSnapped(const TabStrip* tab_strip) { -#if defined(USE_ASH) DCHECK(tab_strip); ash::wm::WindowState* window_state = ash::wm::GetWindowState(tab_strip->GetWidget()->GetNativeWindow()); return window_state->IsDocked() || window_state->IsSnapped(); -#else - return false; -#endif } // Returns true if |bounds| contains the y-coordinate |y|. The y-coordinate @@ -1660,14 +1651,12 @@ void TabDragController::CompleteDrag() { void TabDragController::MaximizeAttachedWindow() { GetAttachedBrowserWidget()->Maximize(); -#if defined(USE_ASH) if (was_source_fullscreen_ && host_desktop_type_ == chrome::HOST_DESKTOP_TYPE_ASH) { // In fullscreen mode it is only possible to get here if the source // was in "immersive fullscreen" mode, so toggle it back on. ash::accelerators::ToggleFullscreen(); } -#endif } void TabDragController::ResetDelegates() { @@ -1712,7 +1701,6 @@ void TabDragController::BringWindowUnderPointToFront( if (!widget_window) return; -#if defined(USE_ASH) if (host_desktop_type_ == chrome::HOST_DESKTOP_TYPE_ASH) { // TODO(varkha): The code below ensures that the phantom drag widget // is shown on top of browser windows. The code should be moved to ash/ @@ -1744,9 +1732,6 @@ void TabDragController::BringWindowUnderPointToFront( } else { widget_window->StackAtTop(); } -#else - widget_window->StackAtTop(); -#endif // The previous call made the window appear on top of the dragged window, // move the dragged window to the front. @@ -1883,7 +1868,6 @@ Browser* TabDragController::CreateBrowserForDrag( } gfx::Point TabDragController::GetCursorScreenPoint() { -#if defined(USE_ASH) if (host_desktop_type_ == chrome::HOST_DESKTOP_TYPE_ASH && event_source_ == EVENT_SOURCE_TOUCH && aura::Env::GetInstance()->is_touch_down()) { @@ -1900,7 +1884,7 @@ gfx::Point TabDragController::GetCursorScreenPoint() { ash::wm::ConvertPointToScreen(widget_window->GetRootWindow(), &touch_point); return touch_point; } -#endif + return screen_->GetCursorScreenPoint(); } diff --git a/ui/message_center/views/toast_contents_view.cc b/ui/message_center/views/toast_contents_view.cc index 677405a..e5de6a2 100644 --- a/ui/message_center/views/toast_contents_view.cc +++ b/ui/message_center/views/toast_contents_view.cc @@ -24,7 +24,7 @@ #include "ui/views/widget/widget.h" #include "ui/views/widget/widget_delegate.h" -#if defined(OS_WIN) && defined(USE_ASH) +#if defined(OS_WIN) #include "ui/views/widget/desktop_aura/desktop_native_widget_aura.h" #endif @@ -339,7 +339,7 @@ void ToastContentsView::CreateWidget(gfx::NativeView parent) { views::Widget* widget = new views::Widget(); widget->set_focus_on_creation(false); -#if defined(OS_WIN) && defined(USE_ASH) +#if defined(OS_WIN) // We want to ensure that this toast always goes to the native desktop, // not the Ash desktop (since there is already another toast contents view // there. diff --git a/ui/views/controls/menu/menu_controller.cc b/ui/views/controls/menu/menu_controller.cc index 87e7ad2..38a5e81 100644 --- a/ui/views/controls/menu/menu_controller.cc +++ b/ui/views/controls/menu/menu_controller.cc @@ -1139,7 +1139,7 @@ void MenuController::UpdateInitialLocation(const gfx::Rect& bounds, // avoid repeated system queries for the info. pending_state_.monitor_bounds = GetScreen()->GetDisplayNearestPoint( bounds.origin()).work_area(); -#if defined(USE_ASH) + if (!pending_state_.monitor_bounds.Contains(bounds)) { // Use the monitor area if the work area doesn't contain the bounds. This // handles showing a menu from the launcher. @@ -1148,7 +1148,6 @@ void MenuController::UpdateInitialLocation(const gfx::Rect& bounds, if (monitor_area.Contains(bounds)) pending_state_.monitor_bounds = monitor_area; } -#endif } void MenuController::Accept(MenuItemView* item, int event_flags) { |