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

Side by Side Diff: ui/views/widget/native_widget_aura.cc

Issue 8931022: NativeWidgetAura::ClearNativeFocus fix (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: reenable PopupAccelerators test Created 9 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 | Annotate | Revision Log
« no previous file with comments | « chrome/browser/ui/omnibox/omnibox_view_browsertest.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) 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 "ui/views/widget/native_widget_aura.h" 5 #include "ui/views/widget/native_widget_aura.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/string_util.h" 8 #include "base/string_util.h"
9 #include "ui/aura/client/activation_client.h" 9 #include "ui/aura/client/activation_client.h"
10 #include "ui/aura/client/aura_constants.h" 10 #include "ui/aura/client/aura_constants.h"
(...skipping 510 matching lines...) Expand 10 before | Expand all | Expand 10 after
521 if (window_) 521 if (window_)
522 window_->SchedulePaintInRect(rect); 522 window_->SchedulePaintInRect(rect);
523 } 523 }
524 524
525 void NativeWidgetAura::SetCursor(gfx::NativeCursor cursor) { 525 void NativeWidgetAura::SetCursor(gfx::NativeCursor cursor) {
526 cursor_ = cursor; 526 cursor_ = cursor;
527 aura::RootWindow::GetInstance()->SetCursor(cursor); 527 aura::RootWindow::GetInstance()->SetCursor(cursor);
528 } 528 }
529 529
530 void NativeWidgetAura::ClearNativeFocus() { 530 void NativeWidgetAura::ClearNativeFocus() {
531 if (window_ && window_->GetFocusManager()) 531 if (window_ && window_->GetFocusManager() &&
532 window_->Contains(window_->GetFocusManager()->GetFocusedWindow())) {
532 window_->GetFocusManager()->SetFocusedWindow(window_); 533 window_->GetFocusManager()->SetFocusedWindow(window_);
534 }
533 } 535 }
534 536
535 void NativeWidgetAura::FocusNativeView(gfx::NativeView native_view) { 537 void NativeWidgetAura::FocusNativeView(gfx::NativeView native_view) {
536 window_->GetFocusManager()->SetFocusedWindow(native_view); 538 window_->GetFocusManager()->SetFocusedWindow(native_view);
537 } 539 }
538 540
539 gfx::Rect NativeWidgetAura::GetWorkAreaBoundsInScreen() const { 541 gfx::Rect NativeWidgetAura::GetWorkAreaBoundsInScreen() const {
540 return gfx::Screen::GetMonitorWorkAreaNearestWindow(GetNativeView()); 542 return gfx::Screen::GetMonitorWorkAreaNearestWindow(GetNativeView());
541 } 543 }
542 544
(...skipping 308 matching lines...) Expand 10 before | Expand all | Expand 10 after
851 } 853 }
852 } 854 }
853 855
854 // static 856 // static
855 bool NativeWidgetPrivate::IsMouseButtonDown() { 857 bool NativeWidgetPrivate::IsMouseButtonDown() {
856 return aura::RootWindow::GetInstance()->IsMouseButtonDown(); 858 return aura::RootWindow::GetInstance()->IsMouseButtonDown();
857 } 859 }
858 860
859 } // namespace internal 861 } // namespace internal
860 } // namespace views 862 } // namespace views
OLDNEW
« no previous file with comments | « chrome/browser/ui/omnibox/omnibox_view_browsertest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698