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

Unified Diff: chrome/browser/ui/views/frame/minimize_button_metrics_win.h

Issue 2833363002: Add GetCaptionButtonHeightInDIPs() method (Closed)
Patch Set: Addressed review comments Created 3 years, 8 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: chrome/browser/ui/views/frame/minimize_button_metrics_win.h
diff --git a/chrome/browser/ui/views/frame/minimize_button_metrics_win.h b/chrome/browser/ui/views/frame/minimize_button_metrics_win.h
index c3a6d3f34bbf82a68d207684750dc51576c1e4e1..aa315e2684b9dcdedba0972870e1a841844f8699 100644
--- a/chrome/browser/ui/views/frame/minimize_button_metrics_win.h
+++ b/chrome/browser/ui/views/frame/minimize_button_metrics_win.h
@@ -25,6 +25,10 @@ class MinimizeButtonMetrics {
// value rather than read when called.
int GetMinimizeButtonOffsetX() const;
+ // Obtain the height of the native caption button.
+ // As for GetMinimizeButtonOffsetX(), this might come from a cached value.
+ int GetCaptionButtonHeight() const;
+
// Must be called when hwnd_ is activated to update the minimize button
// position cache.
void OnHWNDActivated();
@@ -48,10 +52,13 @@ class MinimizeButtonMetrics {
// Static cache of |cached_minimize_button_x_delta_|.
static int last_cached_minimize_button_x_delta_;
- // Static cache of offset value representing the different between
+ // Static cache of offset value representing the difference between
// DWMWA_CAPTION_BUTTON_BOUNDS and WM_GETTITLEBARINFOEX
static int button_bounds_position_offset_;
+ // Static cache of Windows caption button height.
+ static int caption_button_height_;
+
// Has OnHWNDActivated() been invoked?
bool was_activated_;

Powered by Google App Engine
This is Rietveld 408576698