OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 "views/view.h" | 5 #include "views/view.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 | 8 |
9 #include "base/logging.h" | 9 #include "base/logging.h" |
10 #include "base/memory/scoped_ptr.h" | 10 #include "base/memory/scoped_ptr.h" |
(...skipping 755 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
766 return widget ? widget->GetThemeProvider() : NULL; | 766 return widget ? widget->GetThemeProvider() : NULL; |
767 } | 767 } |
768 | 768 |
769 // Accelerated Painting -------------------------------------------------------- | 769 // Accelerated Painting -------------------------------------------------------- |
770 | 770 |
771 // static | 771 // static |
772 void View::set_use_acceleration_when_possible(bool use) { | 772 void View::set_use_acceleration_when_possible(bool use) { |
773 use_acceleration_when_possible = use; | 773 use_acceleration_when_possible = use; |
774 } | 774 } |
775 | 775 |
| 776 // static |
| 777 bool View::get_use_acceleration_when_possible() { |
| 778 return use_acceleration_when_possible; |
| 779 } |
| 780 |
776 // Input ----------------------------------------------------------------------- | 781 // Input ----------------------------------------------------------------------- |
777 | 782 |
778 View* View::GetEventHandlerForPoint(const gfx::Point& point) { | 783 View* View::GetEventHandlerForPoint(const gfx::Point& point) { |
779 // Walk the child Views recursively looking for the View that most | 784 // Walk the child Views recursively looking for the View that most |
780 // tightly encloses the specified point. | 785 // tightly encloses the specified point. |
781 for (int i = child_count() - 1; i >= 0; --i) { | 786 for (int i = child_count() - 1; i >= 0; --i) { |
782 View* child = GetChildViewAt(i); | 787 View* child = GetChildViewAt(i); |
783 if (!child->IsVisible()) | 788 if (!child->IsVisible()) |
784 continue; | 789 continue; |
785 | 790 |
(...skipping 1120 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1906 result.append(GetChildViewAt(i)->PrintViewGraph(false)); | 1911 result.append(GetChildViewAt(i)->PrintViewGraph(false)); |
1907 | 1912 |
1908 if (first) | 1913 if (first) |
1909 result.append("}\n"); | 1914 result.append("}\n"); |
1910 | 1915 |
1911 return result; | 1916 return result; |
1912 } | 1917 } |
1913 #endif | 1918 #endif |
1914 | 1919 |
1915 } // namespace views | 1920 } // namespace views |
OLD | NEW |