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); |
| 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 2000 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2424 // Message the RootView to do the drag and drop. That way if we're removed | 2426 // Message the RootView to do the drag and drop. That way if we're removed |
2425 // the RootView can detect it and avoid calling us back. | 2427 // the RootView can detect it and avoid calling us back. |
2426 gfx::Point widget_location(event.location()); | 2428 gfx::Point widget_location(event.location()); |
2427 ConvertPointToWidget(this, &widget_location); | 2429 ConvertPointToWidget(this, &widget_location); |
2428 widget->RunShellDrag(this, data, widget_location, drag_operations, source); | 2430 widget->RunShellDrag(this, data, widget_location, drag_operations, source); |
2429 // WARNING: we may have been deleted. | 2431 // WARNING: we may have been deleted. |
2430 return true; | 2432 return true; |
2431 } | 2433 } |
2432 | 2434 |
2433 } // namespace views | 2435 } // namespace views |
OLD | NEW |