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

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

Issue 1952473002: Fix for 504133 - wandering identity switcher button (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Changes based on review feedback. Created 4 years, 7 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 0b331cbea347ca0d1c6db2949c6783efea1714e1..c3a6d3f34bbf82a68d207684750dc51576c1e4e1 100644
--- a/chrome/browser/ui/views/frame/minimize_button_metrics_win.h
+++ b/chrome/browser/ui/views/frame/minimize_button_metrics_win.h
@@ -33,6 +33,11 @@ class MinimizeButtonMetrics {
// Gets the value for GetMinimizeButtonOffsetX(), caching if found.
int GetAndCacheMinimizeButtonOffsetX() const;
+ int GetButtonBoundsPositionOffset(const RECT& button_bounds,
+ const RECT& window_bounds) const;
+
+ int GetMinimizeButtonOffsetForWindow() const;
+
HWND hwnd_;
// Cached offset of the minimize button. If RTL this is the location of the
@@ -43,6 +48,10 @@ 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
+ // DWMWA_CAPTION_BUTTON_BOUNDS and WM_GETTITLEBARINFOEX
+ static int button_bounds_position_offset_;
+
// Has OnHWNDActivated() been invoked?
bool was_activated_;

Powered by Google App Engine
This is Rietveld 408576698