| 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/native_widget_aura.h" | 5 #include "views/widget/native_widget_aura.h" |
| 6 | 6 |
| 7 #include "base/bind.h" | 7 #include "base/bind.h" |
| 8 #include "ui/aura/desktop.h" | 8 #include "ui/aura/desktop.h" |
| 9 #include "ui/aura/event.h" | 9 #include "ui/aura/event.h" |
| 10 #include "ui/aura/window.h" | 10 #include "ui/aura/window.h" |
| (...skipping 516 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 527 TouchEvent touch_event(event); | 527 TouchEvent touch_event(event); |
| 528 return delegate_->OnTouchEvent(touch_event); | 528 return delegate_->OnTouchEvent(touch_event); |
| 529 } | 529 } |
| 530 | 530 |
| 531 bool NativeWidgetAura::ShouldActivate(aura::Event* event) { | 531 bool NativeWidgetAura::ShouldActivate(aura::Event* event) { |
| 532 return can_activate_; | 532 return can_activate_; |
| 533 } | 533 } |
| 534 | 534 |
| 535 void NativeWidgetAura::OnActivated() { | 535 void NativeWidgetAura::OnActivated() { |
| 536 delegate_->OnNativeWidgetActivationChanged(true); | 536 delegate_->OnNativeWidgetActivationChanged(true); |
| 537 if (IsVisible()) | 537 if (IsVisible() && GetWidget()->non_client_view()) |
| 538 GetWidget()->non_client_view()->SchedulePaint(); | 538 GetWidget()->non_client_view()->SchedulePaint(); |
| 539 } | 539 } |
| 540 | 540 |
| 541 void NativeWidgetAura::OnLostActive() { | 541 void NativeWidgetAura::OnLostActive() { |
| 542 delegate_->OnNativeWidgetActivationChanged(false); | 542 delegate_->OnNativeWidgetActivationChanged(false); |
| 543 if (IsVisible()) | 543 if (IsVisible() && GetWidget()->non_client_view()) |
| 544 GetWidget()->non_client_view()->SchedulePaint(); | 544 GetWidget()->non_client_view()->SchedulePaint(); |
| 545 } | 545 } |
| 546 | 546 |
| 547 void NativeWidgetAura::OnCaptureLost() { | 547 void NativeWidgetAura::OnCaptureLost() { |
| 548 delegate_->OnMouseCaptureLost(); | 548 delegate_->OnMouseCaptureLost(); |
| 549 } | 549 } |
| 550 | 550 |
| 551 void NativeWidgetAura::OnPaint(gfx::Canvas* canvas) { | 551 void NativeWidgetAura::OnPaint(gfx::Canvas* canvas) { |
| 552 delegate_->OnNativeWidgetPaint(canvas); | 552 delegate_->OnNativeWidgetPaint(canvas); |
| 553 } | 553 } |
| (...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 654 } | 654 } |
| 655 | 655 |
| 656 // static | 656 // static |
| 657 bool NativeWidgetPrivate::IsMouseButtonDown() { | 657 bool NativeWidgetPrivate::IsMouseButtonDown() { |
| 658 NOTIMPLEMENTED(); | 658 NOTIMPLEMENTED(); |
| 659 return false; | 659 return false; |
| 660 } | 660 } |
| 661 | 661 |
| 662 } // namespace internal | 662 } // namespace internal |
| 663 } // namespace views | 663 } // namespace views |
| OLD | NEW |