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

Side by Side Diff: ui/views/widget/native_widget_win.cc

Issue 11367041: Adds View::GetNativeTheme() to get the NativeTheme. The interesting (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix include 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « ui/views/widget/native_widget_win.h ('k') | ui/views/widget/widget.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 "ui/views/widget/native_widget_win.h" 5 #include "ui/views/widget/native_widget_win.h"
6 6
7 #include <dwmapi.h> 7 #include <dwmapi.h>
8 #include <shellapi.h> 8 #include <shellapi.h>
9 9
10 #include <algorithm> 10 #include <algorithm>
11 11
12 #include "base/bind.h" 12 #include "base/bind.h"
13 #include "base/string_util.h" 13 #include "base/string_util.h"
14 #include "base/win/scoped_gdi_object.h" 14 #include "base/win/scoped_gdi_object.h"
15 #include "base/win/win_util.h" 15 #include "base/win/win_util.h"
16 #include "base/win/windows_version.h" 16 #include "base/win/windows_version.h"
17 #include "ui/base/dragdrop/drag_drop_types.h" 17 #include "ui/base/dragdrop/drag_drop_types.h"
18 #include "ui/base/dragdrop/drag_source.h" 18 #include "ui/base/dragdrop/drag_source.h"
19 #include "ui/base/dragdrop/os_exchange_data.h" 19 #include "ui/base/dragdrop/os_exchange_data.h"
20 #include "ui/base/dragdrop/os_exchange_data_provider_win.h" 20 #include "ui/base/dragdrop/os_exchange_data_provider_win.h"
21 #include "ui/base/events/event.h" 21 #include "ui/base/events/event.h"
22 #include "ui/base/keycodes/keyboard_code_conversion_win.h" 22 #include "ui/base/keycodes/keyboard_code_conversion_win.h"
23 #include "ui/base/l10n/l10n_util_win.h" 23 #include "ui/base/l10n/l10n_util_win.h"
24 #include "ui/base/native_theme/native_theme.h"
24 #include "ui/base/theme_provider.h" 25 #include "ui/base/theme_provider.h"
25 #include "ui/base/view_prop.h" 26 #include "ui/base/view_prop.h"
26 #include "ui/base/win/hwnd_util.h" 27 #include "ui/base/win/hwnd_util.h"
27 #include "ui/base/win/mouse_wheel_util.h" 28 #include "ui/base/win/mouse_wheel_util.h"
28 #include "ui/base/win/shell.h" 29 #include "ui/base/win/shell.h"
29 #include "ui/gfx/canvas.h" 30 #include "ui/gfx/canvas.h"
30 #include "ui/gfx/canvas_paint.h" 31 #include "ui/gfx/canvas_paint.h"
31 #include "ui/gfx/canvas_skia_paint.h" 32 #include "ui/gfx/canvas_skia_paint.h"
32 #include "ui/gfx/path.h" 33 #include "ui/gfx/path.h"
33 #include "ui/gfx/screen.h" 34 #include "ui/gfx/screen.h"
(...skipping 443 matching lines...) Expand 10 before | Expand all | Expand 10 after
477 } 478 }
478 479
479 void NativeWidgetWin::EndMoveLoop() { 480 void NativeWidgetWin::EndMoveLoop() {
480 message_handler_->EndMoveLoop(); 481 message_handler_->EndMoveLoop();
481 } 482 }
482 483
483 void NativeWidgetWin::SetVisibilityChangedAnimationsEnabled(bool value) { 484 void NativeWidgetWin::SetVisibilityChangedAnimationsEnabled(bool value) {
484 message_handler_->SetVisibilityChangedAnimationsEnabled(value); 485 message_handler_->SetVisibilityChangedAnimationsEnabled(value);
485 } 486 }
486 487
488 ui::NativeTheme* NativeWidgetWin::GetNativeTheme() {
489 return ui::NativeTheme::instance();
490 }
491
487 //////////////////////////////////////////////////////////////////////////////// 492 ////////////////////////////////////////////////////////////////////////////////
488 // NativeWidgetWin, protected: 493 // NativeWidgetWin, protected:
489 494
490 void NativeWidgetWin::OnFinalMessage(HWND window) { 495 void NativeWidgetWin::OnFinalMessage(HWND window) {
491 // We don't destroy props in WM_DESTROY as we may still get messages after 496 // We don't destroy props in WM_DESTROY as we may still get messages after
492 // WM_DESTROY that assume the properties are still valid (such as WM_CLOSE). 497 // WM_DESTROY that assume the properties are still valid (such as WM_CLOSE).
493 props_.clear(); 498 props_.clear();
494 delegate_->OnNativeWidgetDestroyed(); 499 delegate_->OnNativeWidgetDestroyed();
495 if (ownership_ == Widget::InitParams::NATIVE_WIDGET_OWNS_WIDGET) 500 if (ownership_ == Widget::InitParams::NATIVE_WIDGET_OWNS_WIDGET)
496 delete this; 501 delete this;
(...skipping 520 matching lines...) Expand 10 before | Expand all | Expand 10 after
1017 // static 1022 // static
1018 bool NativeWidgetPrivate::IsTouchDown() { 1023 bool NativeWidgetPrivate::IsTouchDown() {
1019 // This currently isn't necessary because we're not generating touch events on 1024 // This currently isn't necessary because we're not generating touch events on
1020 // windows. When we do, this will need to be updated. 1025 // windows. When we do, this will need to be updated.
1021 return false; 1026 return false;
1022 } 1027 }
1023 1028
1024 } // namespace internal 1029 } // namespace internal
1025 1030
1026 } // namespace views 1031 } // namespace views
OLDNEW
« no previous file with comments | « ui/views/widget/native_widget_win.h ('k') | ui/views/widget/widget.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698