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

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

Issue 10834079: views: Extract Widget observer into its own header file. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 4 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 | « ui/views/bubble/bubble_delegate.cc ('k') | ui/views/views.gyp » ('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) 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
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
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
OLDNEW
« no previous file with comments | « ui/views/bubble/bubble_delegate.cc ('k') | ui/views/views.gyp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698