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

Side by Side Diff: ash/host/ash_window_tree_host_win.cc

Issue 1119953002: Enable display rotation, magnifier in unified desktop mode (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 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
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 "ash/host/ash_window_tree_host.h" 5 #include "ash/host/ash_window_tree_host.h"
6 6
7 #include "ash/ash_export.h" 7 #include "ash/ash_export.h"
8 #include "ash/ash_switches.h" 8 #include "ash/ash_switches.h"
9 #include "ash/host/ash_remote_window_tree_host_win.h" 9 #include "ash/host/ash_remote_window_tree_host_win.h"
10 #include "ash/host/ash_window_tree_host_init_params.h" 10 #include "ash/host/ash_window_tree_host_init_params.h"
11 #include "ash/host/root_window_transformer.h" 11 #include "ash/host/root_window_transformer.h"
12 #include "ash/host/transformer_helper.h" 12 #include "ash/host/transformer_helper.h"
13 #include "base/command_line.h" 13 #include "base/command_line.h"
14 #include "base/win/windows_version.h" 14 #include "base/win/windows_version.h"
15 #include "ui/aura/window_tree_host_win.h" 15 #include "ui/aura/window_tree_host_win.h"
16 #include "ui/gfx/geometry/insets.h" 16 #include "ui/gfx/geometry/insets.h"
17 #include "ui/gfx/transform.h" 17 #include "ui/gfx/transform.h"
18 18
19 namespace ash { 19 namespace ash {
20 namespace { 20 namespace {
21 21
22 class AshWindowTreeHostWin : public AshWindowTreeHost, 22 class AshWindowTreeHostWin : public AshWindowTreeHost,
23 public aura::WindowTreeHostWin { 23 public aura::WindowTreeHostWin {
24 public: 24 public:
25 explicit AshWindowTreeHostWin(const gfx::Rect& initial_bounds) 25 explicit AshWindowTreeHostWin(const gfx::Rect& initial_bounds)
26 : aura::WindowTreeHostWin(initial_bounds), 26 : aura::WindowTreeHostWin(initial_bounds),
27 fullscreen_(false), 27 fullscreen_(false),
28 saved_window_style_(0), 28 saved_window_style_(0),
29 saved_window_ex_style_(0), 29 saved_window_ex_style_(0),
30 transformer_helper_(this) {} 30 transformer_helper_(this) {
31 transformer_helper_.Init();
32 }
31 ~AshWindowTreeHostWin() override {} 33 ~AshWindowTreeHostWin() override {}
32 34
33 private: 35 private:
34 // AshWindowTreeHost: 36 // AshWindowTreeHost:
35 void ToggleFullScreen() override { 37 void ToggleFullScreen() override {
36 gfx::Rect target_rect; 38 gfx::Rect target_rect;
37 if (!fullscreen_) { 39 if (!fullscreen_) {
38 fullscreen_ = true; 40 fullscreen_ = true;
39 saved_window_style_ = GetWindowLong(hwnd(), GWL_STYLE); 41 saved_window_style_ = GetWindowLong(hwnd(), GWL_STYLE);
40 saved_window_ex_style_ = GetWindowLong(hwnd(), GWL_EXSTYLE); 42 saved_window_ex_style_ = GetWindowLong(hwnd(), GWL_EXSTYLE);
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after
115 const AshWindowTreeHostInitParams& init_params) { 117 const AshWindowTreeHostInitParams& init_params) {
116 if (base::win::GetVersion() >= base::win::VERSION_WIN7 && 118 if (base::win::GetVersion() >= base::win::VERSION_WIN7 &&
117 !base::CommandLine::ForCurrentProcess()->HasSwitch( 119 !base::CommandLine::ForCurrentProcess()->HasSwitch(
118 ash::switches::kForceAshToDesktop)) 120 ash::switches::kForceAshToDesktop))
119 return new AshRemoteWindowTreeHostWin(init_params.remote_hwnd); 121 return new AshRemoteWindowTreeHostWin(init_params.remote_hwnd);
120 122
121 return new AshWindowTreeHostWin(init_params.initial_bounds); 123 return new AshWindowTreeHostWin(init_params.initial_bounds);
122 } 124 }
123 125
124 } // namespace ash 126 } // namespace ash
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698