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

Unified Diff: ui/views/win/hwnd_message_handler.h

Issue 1976923004: Reduce the size of the fullscreen window on activation loss only if the window being activated is … (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Restore newline 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
« no previous file with comments | « no previous file | ui/views/win/hwnd_message_handler.cc » ('j') | ui/views/win/hwnd_message_handler.cc » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/views/win/hwnd_message_handler.h
diff --git a/ui/views/win/hwnd_message_handler.h b/ui/views/win/hwnd_message_handler.h
index 8a114ebee1be90095386ac833f8c4b6937830880..6694c04315a128cd8636db3e89dde100a1e89845 100644
--- a/ui/views/win/hwnd_message_handler.h
+++ b/ui/views/win/hwnd_message_handler.h
@@ -8,11 +8,13 @@
#include <windows.h>
#include <stddef.h>
+#include <map>
#include <memory>
#include <set>
#include <vector>
#include "base/compiler_specific.h"
+#include "base/lazy_instance.h"
#include "base/macros.h"
#include "base/memory/weak_ptr.h"
#include "base/strings/string16.h"
@@ -517,6 +519,16 @@ class VIEWS_EXPORT HWNDMessageHandler :
void SetBoundsInternal(const gfx::Rect& bounds_in_pixels,
bool force_size_changed);
+ // Checks if there is a full screen window on the same monitor as the
+ // |window| which is becoming active. If yes then we reduce the size of the
+ // fullscreen window by 1 px to ensure that maximized windows on the same
+ // monitor don't draw over the taskbar.
+ void CheckAndHandleBackgroundFullscreenOnMonitor(HWND window);
+
+ // Provides functionality to reduce the bounds of the fullscreen window by 1
+ // px on activation loss to a window on the same monitor.
+ void OnBackgroundFullscreen();
+
HWNDMessageHandlerDelegate* delegate_;
std::unique_ptr<FullscreenHandler> fullscreen_handler_;
@@ -651,6 +663,13 @@ class VIEWS_EXPORT HWNDMessageHandler :
// fullscreen window which lost activation. Defaults to false.
bool background_fullscreen_hack_;
+ // This is a map of the HMONITOR to full screeen window instance. It is safe
+ // to keep a raw pointer to the HWNDMessageHandler instance as we track the
+ // window destruction and ensure that the map is cleaned up.
+ typedef std::map<HMONITOR, HWNDMessageHandler*> FullscreenWindowMonitorMap;
sky 2016/05/16 23:05:10 using
ananta 2016/05/16 23:31:03 Done.
+ static base::LazyInstance<FullscreenWindowMonitorMap>
+ fullscreen_monitor_map_;
+
// The WeakPtrFactories below must occur last in the class definition so they
// get destroyed last.
« no previous file with comments | « no previous file | ui/views/win/hwnd_message_handler.cc » ('j') | ui/views/win/hwnd_message_handler.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698