Chromium Code Reviews| Index: chrome/browser/ui/views/ash/chrome_browser_main_extra_parts_ash.cc |
| diff --git a/chrome/browser/ui/views/ash/chrome_browser_main_extra_parts_ash.cc b/chrome/browser/ui/views/ash/chrome_browser_main_extra_parts_ash.cc |
| index 44b9f3e303e9f6bbca39056deba60187638f564e..2f8a5879bc61b991f62cb8f96aa00379bba9ee65 100644 |
| --- a/chrome/browser/ui/views/ash/chrome_browser_main_extra_parts_ash.cc |
| +++ b/chrome/browser/ui/views/ash/chrome_browser_main_extra_parts_ash.cc |
| @@ -14,6 +14,8 @@ |
| #include "ui/aura/env.h" |
| #include "ui/gfx/screen.h" |
| #include "ui/gfx/screen_type_delegate.h" |
| +#include "ui/ui_controls/ui_controls.h" |
| +#include "ui/ui_controls/ui_controls_type_delegate.h" |
| #include "ui/views/widget/desktop_aura/desktop_screen.h" |
| #include "ui/views/widget/desktop_aura/desktop_stacking_client.h" |
| @@ -35,6 +37,19 @@ class ScreenTypeDelegateWin : public gfx::ScreenTypeDelegate { |
| private: |
| DISALLOW_COPY_AND_ASSIGN(ScreenTypeDelegateWin); |
| }; |
| + |
| +class UIControlsTypeDelegateWin : public ui_controls::UIControlsTypeDelegate { |
| + public: |
| + UIControlsTypeDelegateWin() {} |
| + virtual ui_controls::UIControlsType GetUIControlsTypeForNativeView( |
| + gfx::NativeView view) OVERRIDE { |
| + return chrome::IsNativeViewInAsh(view) ? |
| + ui_controls::UI_CONTROLS_TYPE_ALTERNATE : |
| + ui_controls::UI_CONTROLS_TYPE_NATIVE; |
| + } |
| + private: |
|
oshima
2012/11/16 20:41:39
nit: new line before private:
scottmg
2012/11/16 22:34:06
Done.
|
| + DISALLOW_COPY_AND_ASSIGN(UIControlsTypeDelegateWin); |
| +}; |
| #endif |
| ChromeBrowserMainExtraPartsAsh::ChromeBrowserMainExtraPartsAsh() { |
| @@ -53,6 +68,8 @@ void ChromeBrowserMainExtraPartsAsh::PreProfileInit() { |
| } else { |
| #if !defined(OS_CHROMEOS) |
| gfx::Screen::SetScreenTypeDelegate(new ScreenTypeDelegateWin); |
| + ui_controls::UIControls::SetUIControlsTypeDelegate( |
| + new UIControlsTypeDelegateWin); |
| #endif |
| } |