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

Side by Side Diff: ui/views/win/hwnd_message_handler.h

Issue 1707233002: Reduce the fullscreen window height by 1px on activation loss. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Move the fullscreen hacks to HWNDMessageHandler Created 4 years, 10 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 unified diff | Download patch
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef UI_VIEWS_WIN_HWND_MESSAGE_HANDLER_H_ 5 #ifndef UI_VIEWS_WIN_HWND_MESSAGE_HANDLER_H_
6 #define UI_VIEWS_WIN_HWND_MESSAGE_HANDLER_H_ 6 #define UI_VIEWS_WIN_HWND_MESSAGE_HANDLER_H_
7 7
8 #include <windows.h> 8 #include <windows.h>
9 #include <stddef.h> 9 #include <stddef.h>
10 10
(...skipping 188 matching lines...) Expand 10 before | Expand all | Expand 10 after
199 199
200 void set_use_system_default_icon(bool use_system_default_icon) { 200 void set_use_system_default_icon(bool use_system_default_icon) {
201 use_system_default_icon_ = use_system_default_icon; 201 use_system_default_icon_ = use_system_default_icon;
202 } 202 }
203 203
204 void SetFullscreen(bool fullscreen); 204 void SetFullscreen(bool fullscreen);
205 205
206 // Updates the window style to reflect whether it can be resized or maximized. 206 // Updates the window style to reflect whether it can be resized or maximized.
207 void SizeConstraintsChanged(); 207 void SizeConstraintsChanged();
208 208
209 // Setter getter combination for a background fullscreen window, i.e a
sky 2016/02/19 22:30:50 You no longer need the setter/getter.
210 // fullscreen window which lost activation.
211 void set_background_fullscreen_hack(bool set_background_fullscreen) {
212 background_fullscreen_hack_ = set_background_fullscreen;
213 }
214
215 bool background_fullscreen_hack() const {
216 return background_fullscreen_hack_;
217 }
218
209 private: 219 private:
210 typedef std::set<DWORD> TouchIDs; 220 typedef std::set<DWORD> TouchIDs;
211 221
212 // Overridden from WindowImpl: 222 // Overridden from WindowImpl:
213 HICON GetDefaultWindowIcon() const override; 223 HICON GetDefaultWindowIcon() const override;
214 HICON GetSmallWindowIcon() const override; 224 HICON GetSmallWindowIcon() const override;
215 LRESULT OnWndProc(UINT message, WPARAM w_param, LPARAM l_param) override; 225 LRESULT OnWndProc(UINT message, WPARAM w_param, LPARAM l_param) override;
216 226
217 // Overridden from WindowEventTarget 227 // Overridden from WindowEventTarget
218 LRESULT HandleMouseMessage(unsigned int message, 228 LRESULT HandleMouseMessage(unsigned int message,
(...skipping 29 matching lines...) Expand all
248 // Callback if the autohide edges have changed. See 258 // Callback if the autohide edges have changed. See
249 // ViewsDelegate::GetAppbarAutohideEdges() for details. 259 // ViewsDelegate::GetAppbarAutohideEdges() for details.
250 void OnAppbarAutohideEdgesChanged(); 260 void OnAppbarAutohideEdgesChanged();
251 261
252 // Can be called after the delegate has had the opportunity to set focus and 262 // Can be called after the delegate has had the opportunity to set focus and
253 // did not do so. 263 // did not do so.
254 void SetInitialFocus(); 264 void SetInitialFocus();
255 265
256 // Called after the WM_ACTIVATE message has been processed by the default 266 // Called after the WM_ACTIVATE message has been processed by the default
257 // windows procedure. 267 // windows procedure.
258 void PostProcessActivateMessage(int activation_state, bool minimized); 268 void PostProcessActivateMessage(
269 int activation_state,
270 bool minimized,
271 HWND window_gaining_or_losing_activation);
259 272
260 // Enables disabled owner windows that may have been disabled due to this 273 // Enables disabled owner windows that may have been disabled due to this
261 // window's modality. 274 // window's modality.
262 void RestoreEnabledIfNecessary(); 275 void RestoreEnabledIfNecessary();
263 276
264 // Executes the specified SC_command. 277 // Executes the specified SC_command.
265 void ExecuteSystemMenuCommand(int command); 278 void ExecuteSystemMenuCommand(int command);
266 279
267 // Start tracking all mouse events so that this window gets sent mouse leave 280 // Start tracking all mouse events so that this window gets sent mouse leave
268 // messages too. 281 // messages too.
(...skipping 356 matching lines...) Expand 10 before | Expand all | Expand 10 after
625 // receive the WM_NCLBUTTONDOWN message. We use this in the subsequent 638 // receive the WM_NCLBUTTONDOWN message. We use this in the subsequent
626 // WM_NCMOUSEMOVE message to see if the mouse actually moved. 639 // WM_NCMOUSEMOVE message to see if the mouse actually moved.
627 // Please refer to the HandleMouseEventInternal function for details on why 640 // Please refer to the HandleMouseEventInternal function for details on why
628 // this is needed. 641 // this is needed.
629 gfx::Point caption_left_button_click_pos_; 642 gfx::Point caption_left_button_click_pos_;
630 643
631 // Set to true if the left mouse button has been pressed on the caption. 644 // Set to true if the left mouse button has been pressed on the caption.
632 // Defaults to false. 645 // Defaults to false.
633 bool left_button_down_on_caption_; 646 bool left_button_down_on_caption_;
634 647
648 // Set to true if the window is a background fullscreen window, i.e a
649 // fullscreen window which lost activation. Defaults to false.
650 bool background_fullscreen_hack_;
651
635 // The WeakPtrFactories below must occur last in the class definition so they 652 // The WeakPtrFactories below must occur last in the class definition so they
636 // get destroyed last. 653 // get destroyed last.
637 654
638 // The factory used to lookup appbar autohide edges. 655 // The factory used to lookup appbar autohide edges.
639 base::WeakPtrFactory<HWNDMessageHandler> autohide_factory_; 656 base::WeakPtrFactory<HWNDMessageHandler> autohide_factory_;
640 657
641 // The factory used with BEGIN_SAFE_MSG_MAP_EX. 658 // The factory used with BEGIN_SAFE_MSG_MAP_EX.
642 base::WeakPtrFactory<HWNDMessageHandler> weak_factory_; 659 base::WeakPtrFactory<HWNDMessageHandler> weak_factory_;
643 660
644 DISALLOW_COPY_AND_ASSIGN(HWNDMessageHandler); 661 DISALLOW_COPY_AND_ASSIGN(HWNDMessageHandler);
645 }; 662 };
646 663
647 } // namespace views 664 } // namespace views
648 665
649 #endif // UI_VIEWS_WIN_HWND_MESSAGE_HANDLER_H_ 666 #endif // UI_VIEWS_WIN_HWND_MESSAGE_HANDLER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698