Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(435)

Side by Side Diff: ui/views/widget/desktop_aura/desktop_native_widget_aura.cc

Issue 11498014: Removes calls to Widget::OnNativeWidgetActivationChanged() from (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Created 8 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « chrome/browser/ui/panels/panel.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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/desktop_aura/desktop_native_widget_aura.h" 5 #include "ui/views/widget/desktop_aura/desktop_native_widget_aura.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "ui/aura/client/stacking_client.h" 8 #include "ui/aura/client/stacking_client.h"
9 #include "ui/aura/focus_manager.h" 9 #include "ui/aura/focus_manager.h"
10 #include "ui/aura/root_window.h" 10 #include "ui/aura/root_window.h"
(...skipping 601 matching lines...) Expand 10 before | Expand all | Expand 10 after
612 } 612 }
613 613
614 //////////////////////////////////////////////////////////////////////////////// 614 ////////////////////////////////////////////////////////////////////////////////
615 // DesktopNativeWidgetAura, aura::ActivationDelegate implementation: 615 // DesktopNativeWidgetAura, aura::ActivationDelegate implementation:
616 616
617 bool DesktopNativeWidgetAura::ShouldActivate() const { 617 bool DesktopNativeWidgetAura::ShouldActivate() const {
618 return can_activate_ && native_widget_delegate_->CanActivate(); 618 return can_activate_ && native_widget_delegate_->CanActivate();
619 } 619 }
620 620
621 void DesktopNativeWidgetAura::OnActivated() { 621 void DesktopNativeWidgetAura::OnActivated() {
622 native_widget_delegate_->OnNativeWidgetActivationChanged(true);
623 if (IsVisible() && GetWidget()->non_client_view()) 622 if (IsVisible() && GetWidget()->non_client_view())
624 GetWidget()->non_client_view()->SchedulePaint(); 623 GetWidget()->non_client_view()->SchedulePaint();
625 } 624 }
626 625
627 void DesktopNativeWidgetAura::OnLostActive() { 626 void DesktopNativeWidgetAura::OnLostActive() {
628 native_widget_delegate_->OnNativeWidgetActivationChanged(false);
629 if (IsVisible() && GetWidget()->non_client_view()) 627 if (IsVisible() && GetWidget()->non_client_view())
630 GetWidget()->non_client_view()->SchedulePaint(); 628 GetWidget()->non_client_view()->SchedulePaint();
631 } 629 }
632 630
633 //////////////////////////////////////////////////////////////////////////////// 631 ////////////////////////////////////////////////////////////////////////////////
634 // DesktopNativeWidgetAura, views::internal::InputMethodDelegate: 632 // DesktopNativeWidgetAura, views::internal::InputMethodDelegate:
635 633
636 void DesktopNativeWidgetAura::DispatchKeyEventPostIME(const ui::KeyEvent& key) { 634 void DesktopNativeWidgetAura::DispatchKeyEventPostIME(const ui::KeyEvent& key) {
637 FocusManager* focus_manager = 635 FocusManager* focus_manager =
638 native_widget_delegate_->AsWidget()->GetFocusManager(); 636 native_widget_delegate_->AsWidget()->GetFocusManager();
(...skipping 23 matching lines...) Expand all
662 drop_helper_->OnDragExit(); 660 drop_helper_->OnDragExit();
663 } 661 }
664 662
665 int DesktopNativeWidgetAura::OnPerformDrop(const ui::DropTargetEvent& event) { 663 int DesktopNativeWidgetAura::OnPerformDrop(const ui::DropTargetEvent& event) {
666 DCHECK(drop_helper_.get() != NULL); 664 DCHECK(drop_helper_.get() != NULL);
667 return drop_helper_->OnDrop(event.data(), event.location(), 665 return drop_helper_->OnDrop(event.data(), event.location(),
668 last_drop_operation_); 666 last_drop_operation_);
669 } 667 }
670 668
671 } // namespace views 669 } // namespace views
OLDNEW
« no previous file with comments | « chrome/browser/ui/panels/panel.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698