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

Side by Side Diff: ui/views/widget/native_widget_win.h

Issue 10446106: Preliminary metro snap plumbing. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Aura compile fixes. Created 8 years, 6 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
« no previous file with comments | « chrome/test/base/test_browser_window.cc ('k') | ui/views/widget/native_widget_win.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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_WIDGET_NATIVE_WIDGET_WIN_H_ 5 #ifndef UI_VIEWS_WIDGET_NATIVE_WIDGET_WIN_H_
6 #define UI_VIEWS_WIDGET_NATIVE_WIDGET_WIN_H_ 6 #define UI_VIEWS_WIDGET_NATIVE_WIDGET_WIN_H_
7 #pragma once 7 #pragma once
8 8
9 #include <atlbase.h> 9 #include <atlbase.h>
10 #include <atlapp.h> 10 #include <atlapp.h>
(...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after
108 108
109 // Hides the window if it hasn't already been force-hidden. The force hidden 109 // Hides the window if it hasn't already been force-hidden. The force hidden
110 // count is tracked, so calling multiple times is allowed, you just have to 110 // count is tracked, so calling multiple times is allowed, you just have to
111 // be sure to call PopForceHidden the same number of times. 111 // be sure to call PopForceHidden the same number of times.
112 void PushForceHidden(); 112 void PushForceHidden();
113 113
114 // Decrements the force hidden count, showing the window if we have reached 114 // Decrements the force hidden count, showing the window if we have reached
115 // the top of the stack. See PushForceHidden. 115 // the top of the stack. See PushForceHidden.
116 void PopForceHidden(); 116 void PopForceHidden();
117 117
118 // Places the window in a pseudo-fullscreen mode where it looks and acts as
119 // like a fullscreen window except that it remains within the boundaries
120 // of the metro snap divider.
121 void SetMetroSnapFullscreen(bool metro_snap);
122
123 bool IsInMetroSnapMode() const;
124
118 BOOL IsWindow() const { 125 BOOL IsWindow() const {
119 return ::IsWindow(GetNativeView()); 126 return ::IsWindow(GetNativeView());
120 } 127 }
121 128
122 BOOL ShowWindow(int command) { 129 BOOL ShowWindow(int command) {
123 DCHECK(::IsWindow(GetNativeView())); 130 DCHECK(::IsWindow(GetNativeView()));
124 return ::ShowWindow(GetNativeView(), command); 131 return ::ShowWindow(GetNativeView(), command);
125 } 132 }
126 133
127 HWND GetParent() const { 134 HWND GetParent() const {
(...skipping 396 matching lines...) Expand 10 before | Expand all | Expand 10 after
524 void RestoreEnabledIfNecessary(); 531 void RestoreEnabledIfNecessary();
525 532
526 void SetInitialFocus(); 533 void SetInitialFocus();
527 534
528 // Notifies any owned windows that we're closing. 535 // Notifies any owned windows that we're closing.
529 void NotifyOwnedWindowsParentClosing(); 536 void NotifyOwnedWindowsParentClosing();
530 537
531 // Overridden from internal::InputMethodDelegate 538 // Overridden from internal::InputMethodDelegate
532 virtual void DispatchKeyEventPostIME(const KeyEvent& key) OVERRIDE; 539 virtual void DispatchKeyEventPostIME(const KeyEvent& key) OVERRIDE;
533 540
541 // Common implementation of fullscreen-related code. This method handles
542 // changing from windowed mode to a display mode (dubbed fullscreen mode)
543 // where the window occupies a fixed portion (possibly 100%) of the screen.
544 // |fullscreen| specifies whether we are entering or leaving fullscreen mode.
545 // |window_rect| contains sizing information that describes the portion of the
546 // screen to be occupied. |window_rect| may be a rect of width
547 // 0, which indicates that sizing should be skipped when
548 // entering fullscreen mode and previously-stored size should
549 // be used when exiting fullscreen mode.
550 void SetFullscreenInternal(bool fullscreen,
551 const gfx::Rect& window_rect);
552
534 // A delegate implementation that handles events received here. 553 // A delegate implementation that handles events received here.
535 // See class documentation for Widget in widget.h for a note about ownership. 554 // See class documentation for Widget in widget.h for a note about ownership.
536 internal::NativeWidgetDelegate* delegate_; 555 internal::NativeWidgetDelegate* delegate_;
537 556
538 // The following factory is used for calls to close the NativeWidgetWin 557 // The following factory is used for calls to close the NativeWidgetWin
539 // instance. 558 // instance.
540 base::WeakPtrFactory<NativeWidgetWin> close_widget_factory_; 559 base::WeakPtrFactory<NativeWidgetWin> close_widget_factory_;
541 560
542 // The flags currently being used with TrackMouseEvent to track mouse 561 // The flags currently being used with TrackMouseEvent to track mouse
543 // messages. 0 if there is no active tracking. The value of this member is 562 // messages. 0 if there is no active tracking. The value of this member is
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after
605 624
606 // The last cursor that was active before the current one was selected. Saved 625 // The last cursor that was active before the current one was selected. Saved
607 // so that we can restore it. 626 // so that we can restore it.
608 gfx::NativeCursor previous_cursor_; 627 gfx::NativeCursor previous_cursor_;
609 628
610 ViewProps props_; 629 ViewProps props_;
611 630
612 // True if we're in fullscreen mode. 631 // True if we're in fullscreen mode.
613 bool fullscreen_; 632 bool fullscreen_;
614 633
634 // True if we're in metro snap mode.
635 bool metro_snap_;
636
615 // If this is greater than zero, we should prevent attempts to make the window 637 // If this is greater than zero, we should prevent attempts to make the window
616 // visible when we handle WM_WINDOWPOSCHANGING. Some calls like 638 // visible when we handle WM_WINDOWPOSCHANGING. Some calls like
617 // ShowWindow(SW_RESTORE) make the window visible in addition to restoring it, 639 // ShowWindow(SW_RESTORE) make the window visible in addition to restoring it,
618 // when all we want to do is restore it. 640 // when all we want to do is restore it.
619 int force_hidden_count_; 641 int force_hidden_count_;
620 642
621 // The window styles before we modified them for the drag frame appearance. 643 // The window styles before we modified them for the drag frame appearance.
622 DWORD drag_frame_saved_window_style_; 644 DWORD drag_frame_saved_window_style_;
623 DWORD drag_frame_saved_window_ex_style_; 645 DWORD drag_frame_saved_window_ex_style_;
624 646
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
662 684
663 // The set of touch devices currently down. 685 // The set of touch devices currently down.
664 TouchIDs touch_ids_; 686 TouchIDs touch_ids_;
665 687
666 DISALLOW_COPY_AND_ASSIGN(NativeWidgetWin); 688 DISALLOW_COPY_AND_ASSIGN(NativeWidgetWin);
667 }; 689 };
668 690
669 } // namespace views 691 } // namespace views
670 692
671 #endif // UI_VIEWS_WIDGET_NATIVE_WIDGET_WIN_H_ 693 #endif // UI_VIEWS_WIDGET_NATIVE_WIDGET_WIN_H_
OLDNEW
« no previous file with comments | « chrome/test/base/test_browser_window.cc ('k') | ui/views/widget/native_widget_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698