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

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

Issue 11428066: Use WS_POPUP for ash_unittests (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
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 | Annotate | Revision Log
« no previous file with comments | « ash/wm/workspace/workspace_window_resizer_unittest.cc ('k') | ui/aura/root_window_host_win.h » ('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/auto_reset.h" 9 #include "base/auto_reset.h"
10 #include "base/bind.h" 10 #include "base/bind.h"
(...skipping 128 matching lines...) Expand 10 before | Expand all | Expand 10 after
139 RootWindow* RootWindow::GetForAcceleratedWidget( 139 RootWindow* RootWindow::GetForAcceleratedWidget(
140 gfx::AcceleratedWidget widget) { 140 gfx::AcceleratedWidget widget) {
141 return reinterpret_cast<RootWindow*>( 141 return reinterpret_cast<RootWindow*>(
142 ui::ViewProp::GetValue(widget, kRootWindowForAcceleratedWidget)); 142 ui::ViewProp::GetValue(widget, kRootWindowForAcceleratedWidget));
143 } 143 }
144 144
145 void RootWindow::Init() { 145 void RootWindow::Init() {
146 compositor()->SetScaleAndSize(GetDeviceScaleFactorFromDisplay(this), 146 compositor()->SetScaleAndSize(GetDeviceScaleFactorFromDisplay(this),
147 host_->GetBounds().size()); 147 host_->GetBounds().size());
148 Window::Init(ui::LAYER_NOT_DRAWN); 148 Window::Init(ui::LAYER_NOT_DRAWN);
149
150 gfx::Point point;
151 if (host_->QueryMouseLocation(&point))
152 SetLastMouseLocation(this, ui::ConvertPointToDIP(layer(), point));
153
154 compositor()->SetRootLayer(layer()); 149 compositor()->SetRootLayer(layer());
155 SetBounds( 150 SetBounds(
156 ui::ConvertRectToDIP(layer(), gfx::Rect(host_->GetBounds().size()))); 151 ui::ConvertRectToDIP(layer(), gfx::Rect(host_->GetBounds().size())));
157 Show(); 152 Show();
158 } 153 }
159 154
160 void RootWindow::ShowRootWindow() { 155 void RootWindow::ShowRootWindow() {
161 host_->Show(); 156 host_->Show();
162 } 157 }
163 158
(...skipping 876 matching lines...) Expand 10 before | Expand all | Expand 10 after
1040 ui::MouseEvent event(ui::ET_MOUSE_MOVED, 1035 ui::MouseEvent event(ui::ET_MOUSE_MOVED,
1041 orig_mouse_location, 1036 orig_mouse_location,
1042 orig_mouse_location, 1037 orig_mouse_location,
1043 ui::EF_IS_SYNTHESIZED); 1038 ui::EF_IS_SYNTHESIZED);
1044 event.set_system_location(Env::GetInstance()->last_mouse_location()); 1039 event.set_system_location(Env::GetInstance()->last_mouse_location());
1045 OnHostMouseEvent(&event); 1040 OnHostMouseEvent(&event);
1046 #endif 1041 #endif
1047 } 1042 }
1048 1043
1049 } // namespace aura 1044 } // namespace aura
OLDNEW
« no previous file with comments | « ash/wm/workspace/workspace_window_resizer_unittest.cc ('k') | ui/aura/root_window_host_win.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698