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

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

Issue 10391165: Notification for device scale factor change (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 8 years, 7 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
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 #ifndef UI_VIEWS_VIEW_H_ 5 #ifndef UI_VIEWS_VIEW_H_
6 #define UI_VIEWS_VIEW_H_ 6 #define UI_VIEWS_VIEW_H_
7 #pragma once 7 #pragma once
8 8
9 #include <algorithm> 9 #include <algorithm>
10 #include <map> 10 #include <map>
(...skipping 933 matching lines...) Expand 10 before | Expand all | Expand 10 after
944 944
945 // Painting ------------------------------------------------------------------ 945 // Painting ------------------------------------------------------------------
946 946
947 // Responsible for calling Paint() on child Views. Override to control the 947 // Responsible for calling Paint() on child Views. Override to control the
948 // order child Views are painted. 948 // order child Views are painted.
949 virtual void PaintChildren(gfx::Canvas* canvas); 949 virtual void PaintChildren(gfx::Canvas* canvas);
950 950
951 // Override to provide rendering in any part of the View's bounds. Typically 951 // Override to provide rendering in any part of the View's bounds. Typically
952 // this is the "contents" of the view. If you override this method you will 952 // this is the "contents" of the view. If you override this method you will
953 // have to call the subsequent OnPaint*() methods manually. 953 // have to call the subsequent OnPaint*() methods manually.
954 virtual void OnPaint(gfx::Canvas* canvas); 954 virtual void OnPaint(gfx::Canvas* canvas) OVERRIDE;
sky 2012/05/16 21:16:01 Is OVERRIDE right here?
oshima 2012/05/16 21:50:29 oops, sorry. I thought this was OnPaintLayer once
955 955
956 // Override to paint a background before any content is drawn. Typically this 956 // Override to paint a background before any content is drawn. Typically this
957 // is done if you are satisfied with a default OnPaint handler but wish to 957 // is done if you are satisfied with a default OnPaint handler but wish to
958 // supply a different background. 958 // supply a different background.
959 virtual void OnPaintBackground(gfx::Canvas* canvas); 959 virtual void OnPaintBackground(gfx::Canvas* canvas);
960 960
961 // Override to paint a border not specified by SetBorder(). 961 // Override to paint a border not specified by SetBorder().
962 virtual void OnPaintBorder(gfx::Canvas* canvas); 962 virtual void OnPaintBorder(gfx::Canvas* canvas);
963 963
964 // Override to paint a focus border (usually a dotted rectangle) around 964 // Override to paint a focus border (usually a dotted rectangle) around
(...skipping 24 matching lines...) Expand all
989 // the right layer. 989 // the right layer.
990 virtual void MoveLayerToParent(ui::Layer* parent_layer, 990 virtual void MoveLayerToParent(ui::Layer* parent_layer,
991 const gfx::Point& point); 991 const gfx::Point& point);
992 992
993 // Called to update the bounds of any child layers within this View's 993 // Called to update the bounds of any child layers within this View's
994 // hierarchy when something happens to the hierarchy. 994 // hierarchy when something happens to the hierarchy.
995 virtual void UpdateChildLayerBounds(const gfx::Point& offset); 995 virtual void UpdateChildLayerBounds(const gfx::Point& offset);
996 996
997 // Overridden from ui::LayerDelegate: 997 // Overridden from ui::LayerDelegate:
998 virtual void OnPaintLayer(gfx::Canvas* canvas) OVERRIDE; 998 virtual void OnPaintLayer(gfx::Canvas* canvas) OVERRIDE;
999 virtual void OnDeviceScaleFactorChanged(float device_scale_factor) OVERRIDE;
999 1000
1000 // Finds the layer that this view paints to (it may belong to an ancestor 1001 // Finds the layer that this view paints to (it may belong to an ancestor
1001 // view), then reorders the immediate children of that layer to match the 1002 // view), then reorders the immediate children of that layer to match the
1002 // order of the view tree. 1003 // order of the view tree.
1003 virtual void ReorderLayers(); 1004 virtual void ReorderLayers();
1004 1005
1005 // This reorders the immediate children of |*parent_layer| to match the 1006 // This reorders the immediate children of |*parent_layer| to match the
1006 // order of the view tree. 1007 // order of the view tree.
1007 virtual void ReorderChildLayers(ui::Layer* parent_layer); 1008 virtual void ReorderChildLayers(ui::Layer* parent_layer);
1008 1009
(...skipping 450 matching lines...) Expand 10 before | Expand all | Expand 10 after
1459 base::win::ScopedComPtr<NativeViewAccessibilityWin> 1460 base::win::ScopedComPtr<NativeViewAccessibilityWin>
1460 native_view_accessibility_win_; 1461 native_view_accessibility_win_;
1461 #endif 1462 #endif
1462 1463
1463 DISALLOW_COPY_AND_ASSIGN(View); 1464 DISALLOW_COPY_AND_ASSIGN(View);
1464 }; 1465 };
1465 1466
1466 } // namespace views 1467 } // namespace views
1467 1468
1468 #endif // UI_VIEWS_VIEW_H_ 1469 #endif // UI_VIEWS_VIEW_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698