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 710 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
721 return; | 721 return; |
722 | 722 |
723 // Non-empty clip, translate the graphics such that 0,0 corresponds to | 723 // Non-empty clip, translate the graphics such that 0,0 corresponds to |
724 // where this view is located (related to its parent). | 724 // where this view is located (related to its parent). |
725 canvas->Translate(GetMirroredPosition()); | 725 canvas->Translate(GetMirroredPosition()); |
726 canvas->Transform(GetTransform()); | 726 canvas->Transform(GetTransform()); |
727 | 727 |
728 PaintCommon(canvas); | 728 PaintCommon(canvas); |
729 } | 729 } |
730 | 730 |
731 ThemeProvider* View::GetThemeProvider() const { | 731 ui::ThemeProvider* View::GetThemeProvider() const { |
732 const Widget* widget = GetWidget(); | 732 const Widget* widget = GetWidget(); |
733 return widget ? widget->GetThemeProvider() : NULL; | 733 return widget ? widget->GetThemeProvider() : NULL; |
734 } | 734 } |
735 | 735 |
736 // Accelerated Painting -------------------------------------------------------- | 736 // Accelerated Painting -------------------------------------------------------- |
737 | 737 |
738 // static | 738 // static |
739 void View::set_use_acceleration_when_possible(bool use) { | 739 void View::set_use_acceleration_when_possible(bool use) { |
740 use_acceleration_when_possible = use; | 740 use_acceleration_when_possible = use; |
741 } | 741 } |
(...skipping 1364 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2106 gfx::Point widget_location(event.location()); | 2106 gfx::Point widget_location(event.location()); |
2107 ConvertPointToWidget(this, &widget_location); | 2107 ConvertPointToWidget(this, &widget_location); |
2108 GetWidget()->RunShellDrag(this, data, widget_location, drag_operations); | 2108 GetWidget()->RunShellDrag(this, data, widget_location, drag_operations); |
2109 return true; | 2109 return true; |
2110 #else | 2110 #else |
2111 return false; | 2111 return false; |
2112 #endif // !defined(OS_MACOSX) | 2112 #endif // !defined(OS_MACOSX) |
2113 } | 2113 } |
2114 | 2114 |
2115 } // namespace views | 2115 } // namespace views |
OLD | NEW |