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

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

Issue 271543009: Send the device scale factor from Windows 8 ASH during initialization via the MetroViewerHostMsg_Se… (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Reverted changes to printed_document_win.cc Created 6 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/aura/remote_window_tree_host_win.h" 5 #include "ui/aura/remote_window_tree_host_win.h"
6 6
7 #include <windows.h> 7 #include <windows.h>
8 8
9 #include <algorithm> 9 #include <algorithm>
10 10
(...skipping 165 matching lines...) Expand 10 before | Expand all | Expand 10 after
176 DestroyCompositor(); 176 DestroyCompositor();
177 DestroyDispatcher(); 177 DestroyDispatcher();
178 g_instance = NULL; 178 g_instance = NULL;
179 } 179 }
180 180
181 // static 181 // static
182 bool RemoteWindowTreeHostWin::IsValid() { 182 bool RemoteWindowTreeHostWin::IsValid() {
183 return Instance()->remote_window_ != NULL; 183 return Instance()->remote_window_ != NULL;
184 } 184 }
185 185
186 void RemoteWindowTreeHostWin::SetRemoteWindowHandle(HWND remote_window) { 186 void RemoteWindowTreeHostWin::InitializeRemoteWindowAndScaleFactor(
187 HWND remote_window,
188 float device_scale) {
187 remote_window_ = remote_window; 189 remote_window_ = remote_window;
190 gfx::InitDeviceScaleFactor(device_scale);
188 // Do not create compositor here, but in Connected() below. 191 // Do not create compositor here, but in Connected() below.
189 // See http://crbug.com/330179 and http://crbug.com/334380. 192 // See http://crbug.com/330179 and http://crbug.com/334380.
190 } 193 }
191 194
192 void RemoteWindowTreeHostWin::Connected(IPC::Sender* host) { 195 void RemoteWindowTreeHostWin::Connected(IPC::Sender* host) {
193 CHECK(host_ == NULL); 196 CHECK(host_ == NULL);
194 DCHECK(remote_window_); 197 DCHECK(remote_window_);
195 host_ = host; 198 host_ = host;
196 // Recreate the compositor for the target surface represented by the 199 // Recreate the compositor for the target surface represented by the
197 // remote_window HWND. 200 // remote_window HWND.
(...skipping 541 matching lines...) Expand 10 before | Expand all | Expand 10 after
739 } 742 }
740 743
741 void RemoteWindowTreeHostWin::SetEventFlags(uint32 flags) { 744 void RemoteWindowTreeHostWin::SetEventFlags(uint32 flags) {
742 if (flags == event_flags_) 745 if (flags == event_flags_)
743 return; 746 return;
744 event_flags_ = flags; 747 event_flags_ = flags;
745 SetVirtualKeyStates(event_flags_); 748 SetVirtualKeyStates(event_flags_);
746 } 749 }
747 750
748 } // namespace aura 751 } // namespace aura
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698