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

Unified Diff: ui/views/widget/desktop_aura/desktop_window_tree_host_win.cc

Issue 659883002: Enable hidpi on Linux, refactor a bit on Windows to share Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: constants Created 6 years, 2 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
Index: ui/views/widget/desktop_aura/desktop_window_tree_host_win.cc
diff --git a/ui/views/widget/desktop_aura/desktop_window_tree_host_win.cc b/ui/views/widget/desktop_aura/desktop_window_tree_host_win.cc
index d184ae422b6a8727458ed0ff7ac2c711240b3474..0e8186acac8da18276178ed856444fb349799c1f 100644
--- a/ui/views/widget/desktop_aura/desktop_window_tree_host_win.cc
+++ b/ui/views/widget/desktop_aura/desktop_window_tree_host_win.cc
@@ -16,12 +16,12 @@
#include "ui/base/ime/input_method.h"
#include "ui/base/win/shell.h"
#include "ui/compositor/compositor_constants.h"
+#include "ui/gfx/dpi.h"
#include "ui/gfx/insets.h"
#include "ui/gfx/native_widget_types.h"
#include "ui/gfx/path.h"
#include "ui/gfx/path_win.h"
#include "ui/gfx/vector2d.h"
-#include "ui/gfx/win/dpi.h"
#include "ui/native_theme/native_theme_aura.h"
#include "ui/native_theme/native_theme_win.h"
#include "ui/views/corewm/tooltip_win.h"
@@ -138,7 +138,7 @@ void DesktopWindowTreeHostWin::Init(aura::Window* content_window,
has_non_client_view_ = Widget::RequiresNonClientView(params.type);
- gfx::Rect pixel_bounds = gfx::win::DIPToScreenRect(params.bounds);
+ gfx::Rect pixel_bounds = gfx::DIPToScreenRect(params.bounds);
message_handler_->Init(parent_hwnd, pixel_bounds);
if (params.type == Widget::InitParams::TYPE_MENU) {
::SetProp(GetAcceleratedWidget(),
@@ -211,7 +211,7 @@ void DesktopWindowTreeHostWin::ShowWindowWithState(
void DesktopWindowTreeHostWin::ShowMaximizedWithBounds(
const gfx::Rect& restored_bounds) {
- gfx::Rect pixel_bounds = gfx::win::DIPToScreenRect(restored_bounds);
+ gfx::Rect pixel_bounds = gfx::DIPToScreenRect(restored_bounds);
message_handler_->ShowMaximizedWithBounds(pixel_bounds);
}
@@ -220,7 +220,7 @@ bool DesktopWindowTreeHostWin::IsVisible() const {
}
void DesktopWindowTreeHostWin::SetSize(const gfx::Size& size) {
- gfx::Size size_in_pixels = gfx::win::DIPToScreenSize(size);
+ gfx::Size size_in_pixels = gfx::DIPToScreenSize(size);
gfx::Size expanded = GetExpandedWindowSize(
message_handler_->window_ex_style(), size_in_pixels);
window_enlargement_ =
@@ -234,7 +234,7 @@ void DesktopWindowTreeHostWin::StackAtTop() {
}
void DesktopWindowTreeHostWin::CenterWindow(const gfx::Size& size) {
- gfx::Size size_in_pixels = gfx::win::DIPToScreenSize(size);
+ gfx::Size size_in_pixels = gfx::DIPToScreenSize(size);
gfx::Size expanded_size;
expanded_size = GetExpandedWindowSize(message_handler_->window_ex_style(),
size_in_pixels);
@@ -249,25 +249,25 @@ void DesktopWindowTreeHostWin::GetWindowPlacement(
ui::WindowShowState* show_state) const {
message_handler_->GetWindowPlacement(bounds, show_state);
InsetBottomRight(bounds, window_enlargement_);
- *bounds = gfx::win::ScreenToDIPRect(*bounds);
+ *bounds = gfx::ScreenToDIPRect(*bounds);
}
gfx::Rect DesktopWindowTreeHostWin::GetWindowBoundsInScreen() const {
gfx::Rect pixel_bounds = message_handler_->GetWindowBoundsInScreen();
InsetBottomRight(&pixel_bounds, window_enlargement_);
- return gfx::win::ScreenToDIPRect(pixel_bounds);
+ return gfx::ScreenToDIPRect(pixel_bounds);
}
gfx::Rect DesktopWindowTreeHostWin::GetClientAreaBoundsInScreen() const {
gfx::Rect pixel_bounds = message_handler_->GetClientAreaBoundsInScreen();
InsetBottomRight(&pixel_bounds, window_enlargement_);
- return gfx::win::ScreenToDIPRect(pixel_bounds);
+ return gfx::ScreenToDIPRect(pixel_bounds);
}
gfx::Rect DesktopWindowTreeHostWin::GetRestoredBounds() const {
gfx::Rect pixel_bounds = message_handler_->GetRestoredBounds();
InsetBottomRight(&pixel_bounds, window_enlargement_);
- return gfx::win::ScreenToDIPRect(pixel_bounds);
+ return gfx::ScreenToDIPRect(pixel_bounds);
}
gfx::Rect DesktopWindowTreeHostWin::GetWorkAreaBoundsInScreen() const {
@@ -277,7 +277,7 @@ gfx::Rect DesktopWindowTreeHostWin::GetWorkAreaBoundsInScreen() const {
MONITOR_DEFAULTTONEAREST),
&monitor_info);
gfx::Rect pixel_bounds = gfx::Rect(monitor_info.rcWork);
- return gfx::win::ScreenToDIPRect(pixel_bounds);
+ return gfx::ScreenToDIPRect(pixel_bounds);
}
void DesktopWindowTreeHostWin::SetShape(gfx::NativeRegion native_region) {
@@ -640,7 +640,7 @@ bool DesktopWindowTreeHostWin::WillProcessWorkAreaChange() const {
int DesktopWindowTreeHostWin::GetNonClientComponent(
const gfx::Point& point) const {
- gfx::Point dip_position = gfx::win::ScreenToDIPPoint(point);
+ gfx::Point dip_position = gfx::ScreenToDIPPoint(point);
return native_widget_delegate_->GetNonClientComponent(dip_position);
}

Powered by Google App Engine
This is Rietveld 408576698