Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(608)

Unified Diff: chrome/browser/ui/views/ash/chrome_browser_main_extra_parts_ash.cc

Issue 11419013: Add desktop vs. ash context to ui_controls Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: mac typo Created 8 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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
}

Powered by Google App Engine
This is Rietveld 408576698