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

Side by Side Diff: ui/aura/root_window.cc

Issue 26116008: Remove old FocusManager code from Aura. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 7 years, 2 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
« no previous file with comments | « ui/aura/remote_root_window_host_win.cc ('k') | ui/aura/root_window_host_win.cc » ('j') | 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/aura/root_window.h" 5 #include "ui/aura/root_window.h"
6 6
7 #include <vector> 7 #include <vector>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/command_line.h" 10 #include "base/command_line.h"
11 #include "base/debug/trace_event.h" 11 #include "base/debug/trace_event.h"
12 #include "base/logging.h" 12 #include "base/logging.h"
13 #include "base/message_loop/message_loop.h" 13 #include "base/message_loop/message_loop.h"
14 #include "ui/aura/client/activation_client.h"
15 #include "ui/aura/client/capture_client.h" 14 #include "ui/aura/client/capture_client.h"
16 #include "ui/aura/client/cursor_client.h" 15 #include "ui/aura/client/cursor_client.h"
17 #include "ui/aura/client/event_client.h" 16 #include "ui/aura/client/event_client.h"
18 #include "ui/aura/client/focus_client.h" 17 #include "ui/aura/client/focus_client.h"
19 #include "ui/aura/client/screen_position_client.h" 18 #include "ui/aura/client/screen_position_client.h"
20 #include "ui/aura/env.h" 19 #include "ui/aura/env.h"
21 #include "ui/aura/root_window_host.h" 20 #include "ui/aura/root_window_host.h"
22 #include "ui/aura/root_window_observer.h" 21 #include "ui/aura/root_window_observer.h"
23 #include "ui/aura/root_window_transformer.h" 22 #include "ui/aura/root_window_transformer.h"
24 #include "ui/aura/window.h" 23 #include "ui/aura/window.h"
(...skipping 748 matching lines...) Expand 10 before | Expand all | Expand 10 after
773 DispatchMouseExitToHidingWindow(detached); 772 DispatchMouseExitToHidingWindow(detached);
774 OnWindowHidden(detached, new_root ? WINDOW_MOVING : WINDOW_HIDDEN); 773 OnWindowHidden(detached, new_root ? WINDOW_MOVING : WINDOW_HIDDEN);
775 774
776 if (detached->IsVisible() && 775 if (detached->IsVisible() &&
777 detached->ContainsPointInRoot(GetLastMouseLocationInRoot())) { 776 detached->ContainsPointInRoot(GetLastMouseLocationInRoot())) {
778 PostMouseMoveEventAfterWindowChange(); 777 PostMouseMoveEventAfterWindowChange();
779 } 778 }
780 } 779 }
781 780
782 void RootWindow::OnWindowHidden(Window* invisible, WindowHiddenReason reason) { 781 void RootWindow::OnWindowHidden(Window* invisible, WindowHiddenReason reason) {
783 // TODO(beng): This should be removed once FocusController is turned on.
784 if (client::GetFocusClient(this)) {
785 client::GetFocusClient(this)->OnWindowHiddenInRootWindow(
786 invisible, this, reason == WINDOW_DESTROYED);
787 }
788
789 // Do not clear the capture, and the |event_dispatch_target_| if the 782 // Do not clear the capture, and the |event_dispatch_target_| if the
790 // window is moving across root windows, because the target itself 783 // window is moving across root windows, because the target itself
791 // is actually still visible and clearing them stops further event 784 // is actually still visible and clearing them stops further event
792 // processing, which can cause unexpected behaviors. See 785 // processing, which can cause unexpected behaviors. See
793 // crbug.com/157583 786 // crbug.com/157583
794 if (reason != WINDOW_MOVING) { 787 if (reason != WINDOW_MOVING) {
795 Window* capture_window = aura::client::GetCaptureWindow(this); 788 Window* capture_window = aura::client::GetCaptureWindow(this);
796 // If the ancestor of the capture window is hidden, 789 // If the ancestor of the capture window is hidden,
797 // release the capture. 790 // release the capture.
798 if (invisible->Contains(capture_window) && invisible != this) 791 if (invisible->Contains(capture_window) && invisible != this)
(...skipping 453 matching lines...) Expand 10 before | Expand all | Expand 10 after
1252 } 1245 }
1253 1246
1254 gfx::Transform RootWindow::GetInverseRootTransform() const { 1247 gfx::Transform RootWindow::GetInverseRootTransform() const {
1255 float scale = ui::GetDeviceScaleFactor(layer()); 1248 float scale = ui::GetDeviceScaleFactor(layer());
1256 gfx::Transform transform; 1249 gfx::Transform transform;
1257 transform.Scale(1.0f / scale, 1.0f / scale); 1250 transform.Scale(1.0f / scale, 1.0f / scale);
1258 return transformer_->GetInverseTransform() * transform; 1251 return transformer_->GetInverseTransform() * transform;
1259 } 1252 }
1260 1253
1261 } // namespace aura 1254 } // namespace aura
OLDNEW
« no previous file with comments | « ui/aura/remote_root_window_host_win.cc ('k') | ui/aura/root_window_host_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698