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 #include "ui/views/widget/root_view.h" | 5 #include "ui/views/widget/root_view.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 | 8 |
9 #include "base/logging.h" | 9 #include "base/logging.h" |
10 #include "base/message_loop/message_loop.h" | 10 #include "base/message_loop/message_loop.h" |
(...skipping 617 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
628 gesture_handler_ = NULL; | 628 gesture_handler_ = NULL; |
629 scroll_gesture_handler_ = NULL; | 629 scroll_gesture_handler_ = NULL; |
630 event_dispatch_target_ = NULL; | 630 event_dispatch_target_ = NULL; |
631 } | 631 } |
632 } | 632 } |
633 | 633 |
634 void RootView::OnPaint(gfx::Canvas* canvas) { | 634 void RootView::OnPaint(gfx::Canvas* canvas) { |
635 if (!layer() || !layer()->fills_bounds_opaquely()) | 635 if (!layer() || !layer()->fills_bounds_opaquely()) |
636 canvas->DrawColor(SK_ColorBLACK, SkXfermode::kClear_Mode); | 636 canvas->DrawColor(SK_ColorBLACK, SkXfermode::kClear_Mode); |
637 | 637 |
638 // TODO (pkotwicz): Remove this once we switch over to Aura desktop. | |
639 // This is needed so that we can set the background behind the RWHV when the | |
640 // RWHV is not visible. Not needed once there is a view between the RootView | |
641 // and RWHV. | |
642 View::OnPaint(canvas); | 638 View::OnPaint(canvas); |
643 } | 639 } |
644 | 640 |
645 gfx::Vector2d RootView::CalculateOffsetToAncestorWithLayer( | 641 gfx::Vector2d RootView::CalculateOffsetToAncestorWithLayer( |
646 ui::Layer** layer_parent) { | 642 ui::Layer** layer_parent) { |
647 gfx::Vector2d offset(View::CalculateOffsetToAncestorWithLayer(layer_parent)); | 643 gfx::Vector2d offset(View::CalculateOffsetToAncestorWithLayer(layer_parent)); |
648 if (!layer() && layer_parent) | 644 if (!layer() && layer_parent) |
649 *layer_parent = widget_->GetLayer(); | 645 *layer_parent = widget_->GetLayer(); |
650 return offset; | 646 return offset; |
651 } | 647 } |
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
709 return; | 705 return; |
710 } | 706 } |
711 } | 707 } |
712 | 708 |
713 bool RootView::CanDispatchToTarget(ui::EventTarget* target) { | 709 bool RootView::CanDispatchToTarget(ui::EventTarget* target) { |
714 return event_dispatch_target_ == target; | 710 return event_dispatch_target_ == target; |
715 } | 711 } |
716 | 712 |
717 } // namespace internal | 713 } // namespace internal |
718 } // namespace views | 714 } // namespace views |
OLD | NEW |