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

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

Issue 2616523004: Layout avatar button
Patch Set: More stuff Created 3 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
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..96b1544fe94eb163fb436a12314482c14a3ac272 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,11 @@ class MinimizeButtonMetrics {
// value rather than read when called.
int GetMinimizeButtonOffsetX() const;
+ // Obtain the X offset of the native minimize button. Since Windows can lie
+ // to us if we call this at the wrong moment, this might come from a cached
+ // value rather than read when called.
+ int GetMinimizeButtonHeight() const;
+
// Must be called when hwnd_ is activated to update the minimize button
// position cache.
void OnHWNDActivated();
@@ -38,6 +43,9 @@ class MinimizeButtonMetrics {
int GetMinimizeButtonOffsetForWindow() const;
+ void UpdateButtonBoundsSizes(const RECT& button_bounds,
+ const RECT& window_bounds) const;
+
HWND hwnd_;
// Cached offset of the minimize button. If RTL this is the location of the
@@ -52,6 +60,10 @@ class MinimizeButtonMetrics {
// DWMWA_CAPTION_BUTTON_BOUNDS and WM_GETTITLEBARINFOEX
static int button_bounds_position_offset_;
+ // Static cache of offset value representingthe height of
+ // DWMWA_CAPTION_BUTTON_BOUNDS.
+ static int button_bounds_height_;
+
// Has OnHWNDActivated() been invoked?
bool was_activated_;

Powered by Google App Engine
This is Rietveld 408576698