| 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/client/aura_constants.h" | 8 #include "ui/aura/client/aura_constants.h" |
| 9 #include "ui/aura/desktop.h" | 9 #include "ui/aura/desktop.h" |
| 10 #include "ui/aura/desktop_observer.h" | 10 #include "ui/aura/desktop_observer.h" |
| (...skipping 503 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 514 return; | 514 return; |
| 515 if (key.type() == ui::ET_KEY_PRESSED && GetWidget()->GetFocusManager()) | 515 if (key.type() == ui::ET_KEY_PRESSED && GetWidget()->GetFocusManager()) |
| 516 GetWidget()->GetFocusManager()->OnKeyEvent(key); | 516 GetWidget()->GetFocusManager()->OnKeyEvent(key); |
| 517 } | 517 } |
| 518 | 518 |
| 519 //////////////////////////////////////////////////////////////////////////////// | 519 //////////////////////////////////////////////////////////////////////////////// |
| 520 // NativeWidgetAura, aura::WindowDelegate implementation: | 520 // NativeWidgetAura, aura::WindowDelegate implementation: |
| 521 | 521 |
| 522 void NativeWidgetAura::OnBoundsChanged(const gfx::Rect& old_bounds, | 522 void NativeWidgetAura::OnBoundsChanged(const gfx::Rect& old_bounds, |
| 523 const gfx::Rect& new_bounds) { | 523 const gfx::Rect& new_bounds) { |
| 524 if (old_bounds.origin() != new_bounds.origin()) |
| 525 GetWidget()->widget_delegate()->OnWidgetMove(); |
| 524 if (old_bounds.size() != new_bounds.size()) | 526 if (old_bounds.size() != new_bounds.size()) |
| 525 delegate_->OnNativeWidgetSizeChanged(new_bounds.size()); | 527 delegate_->OnNativeWidgetSizeChanged(new_bounds.size()); |
| 526 } | 528 } |
| 527 | 529 |
| 528 void NativeWidgetAura::OnFocus() { | 530 void NativeWidgetAura::OnFocus() { |
| 529 Widget* widget = GetWidget(); | 531 Widget* widget = GetWidget(); |
| 530 if (widget->is_top_level()) { | 532 if (widget->is_top_level()) { |
| 531 InputMethod* input_method = widget->GetInputMethod(); | 533 InputMethod* input_method = widget->GetInputMethod(); |
| 532 input_method->OnFocus(); | 534 input_method->OnFocus(); |
| 533 // See description of got_initial_focus_in_ for details on this. | 535 // See description of got_initial_focus_in_ for details on this. |
| (...skipping 187 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 721 | 723 |
| 722 // static | 724 // static |
| 723 bool NativeWidgetPrivate::IsMouseButtonDown() { | 725 bool NativeWidgetPrivate::IsMouseButtonDown() { |
| 724 // http://crbug.com/102577 | 726 // http://crbug.com/102577 |
| 725 NOTIMPLEMENTED(); | 727 NOTIMPLEMENTED(); |
| 726 return false; | 728 return false; |
| 727 } | 729 } |
| 728 | 730 |
| 729 } // namespace internal | 731 } // namespace internal |
| 730 } // namespace views | 732 } // namespace views |
| OLD | NEW |