OLD | NEW |
---|---|
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 #define _USE_MATH_DEFINES // For VC++ to get M_PI. This has to be first. | 5 #define _USE_MATH_DEFINES // For VC++ to get M_PI. This has to be first. |
6 | 6 |
7 #include "ui/views/view.h" | 7 #include "ui/views/view.h" |
8 | 8 |
9 #include <algorithm> | 9 #include <algorithm> |
10 #include <cmath> | 10 #include <cmath> |
(...skipping 391 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
402 if (visible != visible_) { | 402 if (visible != visible_) { |
403 // If the View is currently visible, schedule paint to refresh parent. | 403 // If the View is currently visible, schedule paint to refresh parent. |
404 // TODO(beng): not sure we should be doing this if we have a layer. | 404 // TODO(beng): not sure we should be doing this if we have a layer. |
405 if (visible_) | 405 if (visible_) |
406 SchedulePaint(); | 406 SchedulePaint(); |
407 | 407 |
408 visible_ = visible; | 408 visible_ = visible; |
409 AdvanceFocusIfNecessary(); | 409 AdvanceFocusIfNecessary(); |
410 | 410 |
411 // Notify the parent. | 411 // Notify the parent. |
412 if (parent_) | 412 if (parent_) { |
413 parent_->ChildVisibilityChanged(this); | 413 parent_->ChildVisibilityChanged(this); |
414 parent_->NotifyAccessibilityEvent(ui::AX_EVENT_CHILDREN_CHANGED, false); | |
sky
2016/02/10 16:19:41
I don't see any documentation for the AXEvent cons
| |
415 } | |
414 | 416 |
415 // This notifies all sub-views recursively. | 417 // This notifies all sub-views recursively. |
416 PropagateVisibilityNotifications(this, visible_); | 418 PropagateVisibilityNotifications(this, visible_); |
417 UpdateLayerVisibility(); | 419 UpdateLayerVisibility(); |
418 | 420 |
419 // If we are newly visible, schedule paint. | 421 // If we are newly visible, schedule paint. |
420 if (visible_) | 422 if (visible_) |
421 SchedulePaint(); | 423 SchedulePaint(); |
422 } | 424 } |
423 } | 425 } |
(...skipping 1982 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
2406 // Message the RootView to do the drag and drop. That way if we're removed | 2408 // Message the RootView to do the drag and drop. That way if we're removed |
2407 // the RootView can detect it and avoid calling us back. | 2409 // the RootView can detect it and avoid calling us back. |
2408 gfx::Point widget_location(event.location()); | 2410 gfx::Point widget_location(event.location()); |
2409 ConvertPointToWidget(this, &widget_location); | 2411 ConvertPointToWidget(this, &widget_location); |
2410 widget->RunShellDrag(this, data, widget_location, drag_operations, source); | 2412 widget->RunShellDrag(this, data, widget_location, drag_operations, source); |
2411 // WARNING: we may have been deleted. | 2413 // WARNING: we may have been deleted. |
2412 return true; | 2414 return true; |
2413 } | 2415 } |
2414 | 2416 |
2415 } // namespace views | 2417 } // namespace views |
OLD | NEW |