| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "chrome/browser/ui/views/frame/browser_desktop_window_tree_host_win.h" | 5 #include "chrome/browser/ui/views/frame/browser_desktop_window_tree_host_win.h" |
| 6 | 6 |
| 7 #include <dwmapi.h> | 7 #include <dwmapi.h> |
| 8 | 8 |
| 9 #include "chrome/browser/lifetime/application_lifetime.h" | 9 #include "chrome/browser/lifetime/application_lifetime.h" |
| 10 #include "chrome/browser/themes/theme_service.h" | 10 #include "chrome/browser/themes/theme_service.h" |
| (...skipping 21 matching lines...) Expand all Loading... |
| 32 | 32 |
| 33 // DesktopThemeProvider maps resource ids using MapThemeImage(). This is | 33 // DesktopThemeProvider maps resource ids using MapThemeImage(). This is |
| 34 // necessary for BrowserDesktopWindowTreeHostWin so that it uses the windows | 34 // necessary for BrowserDesktopWindowTreeHostWin so that it uses the windows |
| 35 // theme images rather than the ash theme images. | 35 // theme images rather than the ash theme images. |
| 36 class DesktopThemeProvider : public ui::ThemeProvider { | 36 class DesktopThemeProvider : public ui::ThemeProvider { |
| 37 public: | 37 public: |
| 38 explicit DesktopThemeProvider(ui::ThemeProvider* delegate) | 38 explicit DesktopThemeProvider(ui::ThemeProvider* delegate) |
| 39 : delegate_(delegate) { | 39 : delegate_(delegate) { |
| 40 } | 40 } |
| 41 | 41 |
| 42 virtual bool UsingNativeTheme() const OVERRIDE { | 42 virtual bool UsingSystemTheme() const OVERRIDE { |
| 43 return delegate_->UsingNativeTheme(); | 43 return delegate_->UsingSystemTheme(); |
| 44 } | 44 } |
| 45 virtual gfx::ImageSkia* GetImageSkiaNamed(int id) const OVERRIDE { | 45 virtual gfx::ImageSkia* GetImageSkiaNamed(int id) const OVERRIDE { |
| 46 return delegate_->GetImageSkiaNamed( | 46 return delegate_->GetImageSkiaNamed( |
| 47 chrome::MapThemeImage(chrome::HOST_DESKTOP_TYPE_NATIVE, id)); | 47 chrome::MapThemeImage(chrome::HOST_DESKTOP_TYPE_NATIVE, id)); |
| 48 } | 48 } |
| 49 virtual SkColor GetColor(int id) const OVERRIDE { | 49 virtual SkColor GetColor(int id) const OVERRIDE { |
| 50 return delegate_->GetColor(id); | 50 return delegate_->GetColor(id); |
| 51 } | 51 } |
| 52 virtual int GetDisplayProperty(int id) const OVERRIDE { | 52 virtual int GetDisplayProperty(int id) const OVERRIDE { |
| 53 return delegate_->GetDisplayProperty(id); | 53 return delegate_->GetDisplayProperty(id); |
| (...skipping 275 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 329 BrowserDesktopWindowTreeHost::CreateBrowserDesktopWindowTreeHost( | 329 BrowserDesktopWindowTreeHost::CreateBrowserDesktopWindowTreeHost( |
| 330 views::internal::NativeWidgetDelegate* native_widget_delegate, | 330 views::internal::NativeWidgetDelegate* native_widget_delegate, |
| 331 views::DesktopNativeWidgetAura* desktop_native_widget_aura, | 331 views::DesktopNativeWidgetAura* desktop_native_widget_aura, |
| 332 BrowserView* browser_view, | 332 BrowserView* browser_view, |
| 333 BrowserFrame* browser_frame) { | 333 BrowserFrame* browser_frame) { |
| 334 return new BrowserDesktopWindowTreeHostWin(native_widget_delegate, | 334 return new BrowserDesktopWindowTreeHostWin(native_widget_delegate, |
| 335 desktop_native_widget_aura, | 335 desktop_native_widget_aura, |
| 336 browser_view, | 336 browser_view, |
| 337 browser_frame); | 337 browser_frame); |
| 338 } | 338 } |
| OLD | NEW |