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

Unified Diff: ui/views/win/hwnd_util_aurawin.cc

Issue 851853002: It is time. (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Trying to reup because the last upload failed. Created 5 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 | « ui/views/win/hwnd_util.h ('k') | ui/views/win/scoped_fullscreen_visibility.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/views/win/hwnd_util_aurawin.cc
diff --git a/ui/views/win/hwnd_util_aurawin.cc b/ui/views/win/hwnd_util_aurawin.cc
deleted file mode 100644
index 37dca58f774e206341931ef235b712d2b12ea111..0000000000000000000000000000000000000000
--- a/ui/views/win/hwnd_util_aurawin.cc
+++ /dev/null
@@ -1,46 +0,0 @@
-// Copyright (c) 2013 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 "ui/views/win/hwnd_util.h"
-
-#include "ui/aura/window.h"
-#include "ui/aura/window_tree_host.h"
-#include "ui/views/widget/widget.h"
-
-namespace views {
-
-HWND HWNDForView(const View* view) {
- return view->GetWidget() ? HWNDForWidget(view->GetWidget()) : NULL;
-}
-
-HWND HWNDForWidget(const Widget* widget) {
- return HWNDForNativeWindow(widget->GetNativeWindow());
-}
-
-HWND HWNDForNativeView(const gfx::NativeView view) {
- return view && view->GetRootWindow() ?
- view->GetHost()->GetAcceleratedWidget() : NULL;
-}
-
-HWND HWNDForNativeWindow(const gfx::NativeWindow window) {
- return window && window->GetRootWindow() ?
- window->GetHost()->GetAcceleratedWidget() : NULL;
-}
-
-gfx::Rect GetWindowBoundsForClientBounds(View* view,
- const gfx::Rect& client_bounds) {
- DCHECK(view);
- aura::WindowTreeHost* host = view->GetWidget()->GetNativeWindow()->GetHost();
- if (host) {
- HWND hwnd = host->GetAcceleratedWidget();
- RECT rect = client_bounds.ToRECT();
- DWORD style = ::GetWindowLong(hwnd, GWL_STYLE);
- DWORD ex_style = ::GetWindowLong(hwnd, GWL_EXSTYLE);
- AdjustWindowRectEx(&rect, style, FALSE, ex_style);
- return gfx::Rect(rect);
- }
- return client_bounds;
-}
-
-} // namespace views
« no previous file with comments | « ui/views/win/hwnd_util.h ('k') | ui/views/win/scoped_fullscreen_visibility.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698