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

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

Issue 2833363002: Add GetCaptionButtonHeightInDIPs() method (Closed)
Patch Set: 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..c53133a574679623fa455c79d68d6a34d6c143aa 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 minimize button.
+ // As for GetMinimizeButtonOffsetX(), this might come from a cached value.
+ int GetMinimizeButtonHeight() 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
Peter Kasting 2017/04/24 23:00:17 Nit: Trailing period.
emx 2017/04/25 11:57:40 Done.
+ static int button_bounds_height_;
Peter Kasting 2017/04/24 23:00:17 Nit: Name |caption_button_height_|?
emx 2017/04/25 11:57:40 Done.
+
// Has OnHWNDActivated() been invoked?
bool was_activated_;

Powered by Google App Engine
This is Rietveld 408576698