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

Side by Side Diff: chrome/browser/ui/views/frame/minimize_button_metrics_win.cc

Issue 23769011: Move a bunch of windows stuff from ui/base/win to ui/gfx/win (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Moar bustage. Created 7 years, 3 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 "chrome/browser/ui/views/frame/minimize_button_metrics_win.h" 5 #include "chrome/browser/ui/views/frame/minimize_button_metrics_win.h"
6 6
7 #include "base/logging.h" 7 #include "base/logging.h"
8 #include "base/i18n/rtl.h" 8 #include "base/i18n/rtl.h"
9 #include "ui/gfx/dpi_win.h" 9 #include "ui/gfx/win/dpi.h"
10 10
11 namespace { 11 namespace {
12 12
13 int GetMinimizeButtonOffsetForWindow(HWND hwnd) { 13 int GetMinimizeButtonOffsetForWindow(HWND hwnd) {
14 // The WM_GETTITLEBARINFOEX message can fail if we are not active/visible. 14 // The WM_GETTITLEBARINFOEX message can fail if we are not active/visible.
15 TITLEBARINFOEX titlebar_info = {0}; 15 TITLEBARINFOEX titlebar_info = {0};
16 titlebar_info.cbSize = sizeof(TITLEBARINFOEX); 16 titlebar_info.cbSize = sizeof(TITLEBARINFOEX);
17 SendMessage(hwnd, WM_GETTITLEBARINFOEX, 0, 17 SendMessage(hwnd, WM_GETTITLEBARINFOEX, 0,
18 reinterpret_cast<WPARAM>(&titlebar_info)); 18 reinterpret_cast<WPARAM>(&titlebar_info));
19 19
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after
70 DCHECK(cached_minimize_button_x_delta_); 70 DCHECK(cached_minimize_button_x_delta_);
71 71
72 RECT client_rect = {0}; 72 RECT client_rect = {0};
73 GetClientRect(hwnd_, &client_rect); 73 GetClientRect(hwnd_, &client_rect);
74 74
75 if (base::i18n::IsRTL()) 75 if (base::i18n::IsRTL())
76 return cached_minimize_button_x_delta_; 76 return cached_minimize_button_x_delta_;
77 return client_rect.right - cached_minimize_button_x_delta_; 77 return client_rect.right - cached_minimize_button_x_delta_;
78 } 78 }
79 79
OLDNEW
« no previous file with comments | « chrome/browser/ui/views/frame/glass_browser_frame_view.cc ('k') | chrome/browser/ui/views/infobars/infobar_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698