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

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

Issue 1746013002: Hide/show widget on Windows screen lock/unlock Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Nits. Created 4 years, 9 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
« no previous file with comments | « ui/views/controls/native/native_view_host.cc ('k') | ui/views/view.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) 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 7
8 #include <stddef.h> 8 #include <stddef.h>
9 9
10 #include <algorithm> 10 #include <algorithm>
(...skipping 1064 matching lines...) Expand 10 before | Expand all | Expand 10 after
1075 virtual void VisibilityChanged(View* starting_from, bool is_visible); 1075 virtual void VisibilityChanged(View* starting_from, bool is_visible);
1076 1076
1077 // This method is invoked when the parent NativeView of the widget that the 1077 // This method is invoked when the parent NativeView of the widget that the
1078 // view is attached to has changed and the view hierarchy has not changed. 1078 // view is attached to has changed and the view hierarchy has not changed.
1079 // ViewHierarchyChanged() is called when the parent NativeView of the widget 1079 // ViewHierarchyChanged() is called when the parent NativeView of the widget
1080 // that the view is attached to is changed as a result of changing the view 1080 // that the view is attached to is changed as a result of changing the view
1081 // hierarchy. Overriding this method is useful for tracking which 1081 // hierarchy. Overriding this method is useful for tracking which
1082 // FocusManager manages this view. 1082 // FocusManager manages this view.
1083 virtual void NativeViewHierarchyChanged(); 1083 virtual void NativeViewHierarchyChanged();
1084 1084
1085 virtual void OnSoftVisibilityChanged(bool visible) {}
1086
1085 // Painting ------------------------------------------------------------------ 1087 // Painting ------------------------------------------------------------------
1086 1088
1087 // Responsible for calling Paint() on child Views. Override to control the 1089 // Responsible for calling Paint() on child Views. Override to control the
1088 // order child Views are painted. 1090 // order child Views are painted.
1089 virtual void PaintChildren(const ui::PaintContext& context); 1091 virtual void PaintChildren(const ui::PaintContext& context);
1090 1092
1091 // Override to provide rendering in any part of the View's bounds. Typically 1093 // Override to provide rendering in any part of the View's bounds. Typically
1092 // this is the "contents" of the view. If you override this method you will 1094 // this is the "contents" of the view. If you override this method you will
1093 // have to call the subsequent OnPaint*() methods manually. 1095 // have to call the subsequent OnPaint*() methods manually.
1094 virtual void OnPaint(gfx::Canvas* canvas); 1096 virtual void OnPaint(gfx::Canvas* canvas);
(...skipping 187 matching lines...) Expand 10 before | Expand all | Expand 10 after
1282 1284
1283 // Size and disposition ------------------------------------------------------ 1285 // Size and disposition ------------------------------------------------------
1284 1286
1285 // Call VisibilityChanged() recursively for all children. 1287 // Call VisibilityChanged() recursively for all children.
1286 void PropagateVisibilityNotifications(View* from, bool is_visible); 1288 void PropagateVisibilityNotifications(View* from, bool is_visible);
1287 1289
1288 // Registers/unregisters accelerators as necessary and calls 1290 // Registers/unregisters accelerators as necessary and calls
1289 // VisibilityChanged(). 1291 // VisibilityChanged().
1290 void VisibilityChangedImpl(View* starting_from, bool is_visible); 1292 void VisibilityChangedImpl(View* starting_from, bool is_visible);
1291 1293
1294 void PropagateSoftVisibilityChanged(bool visible);
1295
1292 // Responsible for propagating bounds change notifications to relevant 1296 // Responsible for propagating bounds change notifications to relevant
1293 // views. 1297 // views.
1294 void BoundsChanged(const gfx::Rect& previous_bounds); 1298 void BoundsChanged(const gfx::Rect& previous_bounds);
1295 1299
1296 // Visible bounds notification registration. 1300 // Visible bounds notification registration.
1297 // When a view is added to a hierarchy, it and all its children are asked if 1301 // When a view is added to a hierarchy, it and all its children are asked if
1298 // they need to be registered for "visible bounds within root" notifications 1302 // they need to be registered for "visible bounds within root" notifications
1299 // (see comment on OnVisibleBoundsChanged()). If they do, they are registered 1303 // (see comment on OnVisibleBoundsChanged()). If they do, they are registered
1300 // with every ancestor between them and the root of the hierarchy. 1304 // with every ancestor between them and the root of the hierarchy.
1301 static void RegisterChildrenForVisibleBoundsNotification(View* view); 1305 static void RegisterChildrenForVisibleBoundsNotification(View* view);
(...skipping 273 matching lines...) Expand 10 before | Expand all | Expand 10 after
1575 // Belongs to this view, but it's reference-counted on some platforms 1579 // Belongs to this view, but it's reference-counted on some platforms
1576 // so we can't use a scoped_ptr. It's dereferenced in the destructor. 1580 // so we can't use a scoped_ptr. It's dereferenced in the destructor.
1577 NativeViewAccessibility* native_view_accessibility_; 1581 NativeViewAccessibility* native_view_accessibility_;
1578 1582
1579 DISALLOW_COPY_AND_ASSIGN(View); 1583 DISALLOW_COPY_AND_ASSIGN(View);
1580 }; 1584 };
1581 1585
1582 } // namespace views 1586 } // namespace views
1583 1587
1584 #endif // UI_VIEWS_VIEW_H_ 1588 #endif // UI_VIEWS_VIEW_H_
OLDNEW
« no previous file with comments | « ui/views/controls/native/native_view_host.cc ('k') | ui/views/view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698