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

Side by Side Diff: views/view.cc

Issue 7104039: First draft to enable turning off compositor for unit tests. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Revised to add conditional compilation guards. Created 9 years, 6 months 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 | « views/view.h ('k') | views/widget/widget.cc » ('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) 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
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
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
OLDNEW
« no previous file with comments | « views/view.h ('k') | views/widget/widget.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698