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

Side by Side Diff: ui/views/view.cc

Issue 2480063002: Split NativeThemeAura into Overlay and NonOverlay versions. (Closed)
Patch Set: Fix Created 4 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
« no previous file with comments | « ui/native_theme/native_theme_mac.mm ('k') | no next file » | 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 #define _USE_MATH_DEFINES // For VC++ to get M_PI. This has to be first. 5 #define _USE_MATH_DEFINES // For VC++ to get M_PI. This has to be first.
6 6
7 #include "ui/views/view.h" 7 #include "ui/views/view.h"
8 8
9 #include <algorithm> 9 #include <algorithm>
10 #include <cmath> 10 #include <cmath>
(...skipping 858 matching lines...) Expand 10 before | Expand all | Expand 10 after
869 const Widget* widget = GetWidget(); 869 const Widget* widget = GetWidget();
870 if (widget) 870 if (widget)
871 return widget->GetNativeTheme(); 871 return widget->GetNativeTheme();
872 872
873 #if defined(OS_WIN) 873 #if defined(OS_WIN)
874 // On Windows, ui::NativeTheme::GetInstanceForWeb() returns NativeThemeWinAura 874 // On Windows, ui::NativeTheme::GetInstanceForWeb() returns NativeThemeWinAura
875 // because that's what the renderer wants, but Views should default to 875 // because that's what the renderer wants, but Views should default to
876 // NativeThemeWin. TODO(estade): clean this up, see http://crbug.com/558029 876 // NativeThemeWin. TODO(estade): clean this up, see http://crbug.com/558029
877 return ui::NativeThemeWin::instance(); 877 return ui::NativeThemeWin::instance();
878 #else 878 #else
879 return ui::NativeTheme::GetInstanceForWeb(); 879 return ui::NativeTheme::GetInstanceForWeb(false);
880 #endif 880 #endif
881 } 881 }
882 882
883 // RTL painting ---------------------------------------------------------------- 883 // RTL painting ----------------------------------------------------------------
884 884
885 void View::EnableCanvasFlippingForRTLUI(bool enable) { 885 void View::EnableCanvasFlippingForRTLUI(bool enable) {
886 flip_canvas_on_paint_for_rtl_ui_ = enable; 886 flip_canvas_on_paint_for_rtl_ui_ = enable;
887 } 887 }
888 888
889 // Input ----------------------------------------------------------------------- 889 // Input -----------------------------------------------------------------------
(...skipping 1532 matching lines...) Expand 10 before | Expand all | Expand 10 after
2422 // Message the RootView to do the drag and drop. That way if we're removed 2422 // Message the RootView to do the drag and drop. That way if we're removed
2423 // the RootView can detect it and avoid calling us back. 2423 // the RootView can detect it and avoid calling us back.
2424 gfx::Point widget_location(event.location()); 2424 gfx::Point widget_location(event.location());
2425 ConvertPointToWidget(this, &widget_location); 2425 ConvertPointToWidget(this, &widget_location);
2426 widget->RunShellDrag(this, data, widget_location, drag_operations, source); 2426 widget->RunShellDrag(this, data, widget_location, drag_operations, source);
2427 // WARNING: we may have been deleted. 2427 // WARNING: we may have been deleted.
2428 return true; 2428 return true;
2429 } 2429 }
2430 2430
2431 } // namespace views 2431 } // namespace views
OLDNEW
« no previous file with comments | « ui/native_theme/native_theme_mac.mm ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698