| 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 "ui/views/view.h" | 5 #include "ui/views/view.h" |
| 6 | 6 |
| 7 #include <algorithm> | 7 #include <algorithm> |
| 8 | 8 |
| 9 #include "base/debug/trace_event.h" | 9 #include "base/debug/trace_event.h" |
| 10 #include "base/logging.h" | 10 #include "base/logging.h" |
| (...skipping 716 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 727 canvas->Transform(GetTransform()); | 727 canvas->Transform(GetTransform()); |
| 728 | 728 |
| 729 PaintCommon(canvas); | 729 PaintCommon(canvas); |
| 730 } | 730 } |
| 731 | 731 |
| 732 ui::ThemeProvider* View::GetThemeProvider() const { | 732 ui::ThemeProvider* View::GetThemeProvider() const { |
| 733 const Widget* widget = GetWidget(); | 733 const Widget* widget = GetWidget(); |
| 734 return widget ? widget->GetThemeProvider() : NULL; | 734 return widget ? widget->GetThemeProvider() : NULL; |
| 735 } | 735 } |
| 736 | 736 |
| 737 ui::NativeTheme* View::GetNativeTheme() { |
| 738 Widget* widget = GetWidget(); |
| 739 return widget ? widget->GetNativeTheme() : NULL; |
| 740 } |
| 741 |
| 737 // Accelerated Painting -------------------------------------------------------- | 742 // Accelerated Painting -------------------------------------------------------- |
| 738 | 743 |
| 739 // static | 744 // static |
| 740 void View::set_use_acceleration_when_possible(bool use) { | 745 void View::set_use_acceleration_when_possible(bool use) { |
| 741 use_acceleration_when_possible = use; | 746 use_acceleration_when_possible = use; |
| 742 } | 747 } |
| 743 | 748 |
| 744 // static | 749 // static |
| 745 bool View::get_use_acceleration_when_possible() { | 750 bool View::get_use_acceleration_when_possible() { |
| 746 return use_acceleration_when_possible; | 751 return use_acceleration_when_possible; |
| (...skipping 1393 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2140 gfx::Point widget_location(event.location()); | 2145 gfx::Point widget_location(event.location()); |
| 2141 ConvertPointToWidget(this, &widget_location); | 2146 ConvertPointToWidget(this, &widget_location); |
| 2142 GetWidget()->RunShellDrag(this, data, widget_location, drag_operations); | 2147 GetWidget()->RunShellDrag(this, data, widget_location, drag_operations); |
| 2143 return true; | 2148 return true; |
| 2144 #else | 2149 #else |
| 2145 return false; | 2150 return false; |
| 2146 #endif // !defined(OS_MACOSX) | 2151 #endif // !defined(OS_MACOSX) |
| 2147 } | 2152 } |
| 2148 | 2153 |
| 2149 } // namespace views | 2154 } // namespace views |
| OLD | NEW |