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

Unified Diff: ash/host/ash_window_tree_host_win.cc

Issue 2611253002: Removes some dead code (Closed)
Patch Set: merge Created 3 years, 11 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ash/host/ash_window_tree_host_win.h ('k') | ash/mus/bridge/wm_root_window_controller_mus.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/host/ash_window_tree_host_win.cc
diff --git a/ash/host/ash_window_tree_host_win.cc b/ash/host/ash_window_tree_host_win.cc
deleted file mode 100644
index ff1e16312540df319ea513547b68dd1989aeef39..0000000000000000000000000000000000000000
--- a/ash/host/ash_window_tree_host_win.cc
+++ /dev/null
@@ -1,58 +0,0 @@
-// Copyright 2014 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "ash/host/ash_window_tree_host_win.h"
-
-#include "base/win/windows_version.h"
-
-namespace ash {
-
-AshWindowTreeHostWin::AshWindowTreeHostWin(const gfx::Rect& initial_bounds)
- : AshWindowTreeHostPlatform(initial_bounds),
- fullscreen_(false),
- saved_window_style_(0),
- saved_window_ex_style_(0) {}
-
-AshWindowTreeHostWin::~AshWindowTreeHostWin() {}
-
-void AshWindowTreeHostWin::ToggleFullScreen() {
- gfx::Rect target_rect;
- gfx::AcceleratedWidget hwnd = GetAcceleratedWidget();
- if (!fullscreen_) {
- fullscreen_ = true;
- saved_window_style_ = GetWindowLong(hwnd, GWL_STYLE);
- saved_window_ex_style_ = GetWindowLong(hwnd, GWL_EXSTYLE);
- GetWindowRect(hwnd, &saved_window_rect_);
- SetWindowLong(hwnd, GWL_STYLE,
- saved_window_style_ & ~(WS_CAPTION | WS_THICKFRAME));
- SetWindowLong(hwnd, GWL_EXSTYLE,
- saved_window_ex_style_ &
- ~(WS_EX_DLGMODALFRAME | WS_EX_WINDOWEDGE |
- WS_EX_CLIENTEDGE | WS_EX_STATICEDGE));
-
- MONITORINFO mi;
- mi.cbSize = sizeof(mi);
- GetMonitorInfo(MonitorFromWindow(hwnd, MONITOR_DEFAULTTONEAREST), &mi);
- target_rect = gfx::Rect(mi.rcMonitor);
- } else {
- fullscreen_ = false;
- SetWindowLong(hwnd, GWL_STYLE, saved_window_style_);
- SetWindowLong(hwnd, GWL_EXSTYLE, saved_window_ex_style_);
- target_rect = gfx::Rect(saved_window_rect_);
- }
- SetWindowPos(hwnd, NULL, target_rect.x(), target_rect.y(),
- target_rect.width(), target_rect.height(),
- SWP_NOZORDER | SWP_NOACTIVATE | SWP_FRAMECHANGED);
-}
-
-void AshWindowTreeHostWin::SetBoundsInPixels(const gfx::Rect& bounds) {
- if (fullscreen_) {
- saved_window_rect_.right = saved_window_rect_.left + bounds.width();
- saved_window_rect_.bottom = saved_window_rect_.top + bounds.height();
- return;
- }
- AshWindowTreeHostPlatform::SetBoundsInPixels(bounds);
-}
-
-} // namespace ash
« no previous file with comments | « ash/host/ash_window_tree_host_win.h ('k') | ash/mus/bridge/wm_root_window_controller_mus.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698