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

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

Issue 13896011: Make javascript dialogs into top-level windows. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix non-aura build. Created 7 years, 7 months 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
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/activation_client.h" 8 #include "ui/aura/client/activation_client.h"
9 #include "ui/aura/client/aura_constants.h" 9 #include "ui/aura/client/aura_constants.h"
10 #include "ui/aura/client/stacking_client.h" 10 #include "ui/aura/client/stacking_client.h"
(...skipping 527 matching lines...) Expand 10 before | Expand all | Expand 10 after
538 if (window_) 538 if (window_)
539 window_->SchedulePaintInRect(rect); 539 window_->SchedulePaintInRect(rect);
540 } 540 }
541 541
542 void DesktopNativeWidgetAura::SetCursor(gfx::NativeCursor cursor) { 542 void DesktopNativeWidgetAura::SetCursor(gfx::NativeCursor cursor) {
543 desktop_root_window_host_->AsRootWindowHost()->SetCursor(cursor); 543 desktop_root_window_host_->AsRootWindowHost()->SetCursor(cursor);
544 } 544 }
545 545
546 void DesktopNativeWidgetAura::ClearNativeFocus() { 546 void DesktopNativeWidgetAura::ClearNativeFocus() {
547 desktop_root_window_host_->ClearNativeFocus(); 547 desktop_root_window_host_->ClearNativeFocus();
548 aura::client::GetFocusClient(window_)->ResetFocusWithinActiveWindow(window_); 548
549 if (ShouldActivate()) {
550 aura::client::GetFocusClient(window_)->
551 ResetFocusWithinActiveWindow(window_);
552 }
549 } 553 }
550 554
551 gfx::Rect DesktopNativeWidgetAura::GetWorkAreaBoundsInScreen() const { 555 gfx::Rect DesktopNativeWidgetAura::GetWorkAreaBoundsInScreen() const {
552 return desktop_root_window_host_->GetWorkAreaBoundsInScreen(); 556 return desktop_root_window_host_->GetWorkAreaBoundsInScreen();
553 } 557 }
554 558
555 void DesktopNativeWidgetAura::SetInactiveRenderingDisabled(bool value) { 559 void DesktopNativeWidgetAura::SetInactiveRenderingDisabled(bool value) {
556 if (!value) { 560 if (!value) {
557 active_window_observer_.reset(); 561 active_window_observer_.reset();
558 } else { 562 } else {
(...skipping 274 matching lines...) Expand 10 before | Expand all | Expand 10 after
833 drop_helper_->OnDragExit(); 837 drop_helper_->OnDragExit();
834 } 838 }
835 839
836 int DesktopNativeWidgetAura::OnPerformDrop(const ui::DropTargetEvent& event) { 840 int DesktopNativeWidgetAura::OnPerformDrop(const ui::DropTargetEvent& event) {
837 DCHECK(drop_helper_.get() != NULL); 841 DCHECK(drop_helper_.get() != NULL);
838 return drop_helper_->OnDrop(event.data(), event.location(), 842 return drop_helper_->OnDrop(event.data(), event.location(),
839 last_drop_operation_); 843 last_drop_operation_);
840 } 844 }
841 845
842 } // namespace views 846 } // namespace views
OLDNEW
« no previous file with comments | « chrome/browser/ui/app_modal_dialogs/javascript_app_modal_dialog.cc ('k') | ui/views/win/hwnd_util.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698