OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 "views/widget/root_view.h" | 5 #include "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.h" | 10 #include "base/message_loop.h" |
(...skipping 419 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
430 return widget_->GetCompositor(); | 430 return widget_->GetCompositor(); |
431 } | 431 } |
432 | 432 |
433 void RootView::MarkLayerDirty() { | 433 void RootView::MarkLayerDirty() { |
434 View::MarkLayerDirty(); | 434 View::MarkLayerDirty(); |
435 if (!layer()) | 435 if (!layer()) |
436 widget_->MarkLayerDirty(); | 436 widget_->MarkLayerDirty(); |
437 } | 437 } |
438 | 438 |
439 void RootView::CalculateOffsetToAncestorWithLayer(gfx::Point* offset, | 439 void RootView::CalculateOffsetToAncestorWithLayer(gfx::Point* offset, |
440 View** ancestor) { | 440 ui::Layer** layer_parent) { |
441 View::CalculateOffsetToAncestorWithLayer(offset, ancestor); | 441 View::CalculateOffsetToAncestorWithLayer(offset, layer_parent); |
442 if (!layer()) | 442 if (!layer()) |
443 widget_->CalculateOffsetToAncestorWithLayer(offset, ancestor); | 443 widget_->CalculateOffsetToAncestorWithLayer(offset, layer_parent); |
444 } | 444 } |
445 | 445 |
446 //////////////////////////////////////////////////////////////////////////////// | 446 //////////////////////////////////////////////////////////////////////////////// |
447 // RootView, private: | 447 // RootView, private: |
448 | 448 |
449 // Input ----------------------------------------------------------------------- | 449 // Input ----------------------------------------------------------------------- |
450 | 450 |
451 void RootView::UpdateCursor(const MouseEvent& event) { | 451 void RootView::UpdateCursor(const MouseEvent& event) { |
452 if (!(event.flags() & ui::EF_IS_NON_CLIENT)) { | 452 if (!(event.flags() & ui::EF_IS_NON_CLIENT)) { |
453 View* v = GetEventHandlerForPoint(event.location()); | 453 View* v = GetEventHandlerForPoint(event.location()); |
454 widget_->SetCursor(v->GetCursor(MouseEvent(event, this, v))); | 454 widget_->SetCursor(v->GetCursor(MouseEvent(event, this, v))); |
455 } | 455 } |
456 } | 456 } |
457 | 457 |
458 void RootView::SetMouseLocationAndFlags(const MouseEvent& event) { | 458 void RootView::SetMouseLocationAndFlags(const MouseEvent& event) { |
459 last_mouse_event_flags_ = event.flags(); | 459 last_mouse_event_flags_ = event.flags(); |
460 last_mouse_event_x_ = event.x(); | 460 last_mouse_event_x_ = event.x(); |
461 last_mouse_event_y_ = event.y(); | 461 last_mouse_event_y_ = event.y(); |
462 } | 462 } |
463 | 463 |
464 } // namespace internal | 464 } // namespace internal |
465 } // namespace views | 465 } // namespace views |
OLD | NEW |