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

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

Issue 10534123: Revert 141723 - First pass at making Chrome support metro snap mode. It creates a fullscreen-alike … (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: 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 | Annotate | Revision Log
« 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
125 BOOL IsWindow() const { 118 BOOL IsWindow() const {
126 return ::IsWindow(GetNativeView()); 119 return ::IsWindow(GetNativeView());
127 } 120 }
128 121
129 BOOL ShowWindow(int command) { 122 BOOL ShowWindow(int command) {
130 DCHECK(::IsWindow(GetNativeView())); 123 DCHECK(::IsWindow(GetNativeView()));
131 return ::ShowWindow(GetNativeView(), command); 124 return ::ShowWindow(GetNativeView(), command);
132 } 125 }
133 126
134 HWND GetParent() const { 127 HWND GetParent() const {
(...skipping 396 matching lines...) Expand 10 before | Expand all | Expand 10 after
531 void RestoreEnabledIfNecessary(); 524 void RestoreEnabledIfNecessary();
532 525
533 void SetInitialFocus(); 526 void SetInitialFocus();
534 527
535 // Notifies any owned windows that we're closing. 528 // Notifies any owned windows that we're closing.
536 void NotifyOwnedWindowsParentClosing(); 529 void NotifyOwnedWindowsParentClosing();
537 530
538 // Overridden from internal::InputMethodDelegate 531 // Overridden from internal::InputMethodDelegate
539 virtual void DispatchKeyEventPostIME(const KeyEvent& key) OVERRIDE; 532 virtual void DispatchKeyEventPostIME(const KeyEvent& key) OVERRIDE;
540 533
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
553 // A delegate implementation that handles events received here. 534 // A delegate implementation that handles events received here.
554 // See class documentation for Widget in widget.h for a note about ownership. 535 // See class documentation for Widget in widget.h for a note about ownership.
555 internal::NativeWidgetDelegate* delegate_; 536 internal::NativeWidgetDelegate* delegate_;
556 537
557 // The following factory is used for calls to close the NativeWidgetWin 538 // The following factory is used for calls to close the NativeWidgetWin
558 // instance. 539 // instance.
559 base::WeakPtrFactory<NativeWidgetWin> close_widget_factory_; 540 base::WeakPtrFactory<NativeWidgetWin> close_widget_factory_;
560 541
561 // The flags currently being used with TrackMouseEvent to track mouse 542 // The flags currently being used with TrackMouseEvent to track mouse
562 // messages. 0 if there is no active tracking. The value of this member is 543 // 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
624 605
625 // The last cursor that was active before the current one was selected. Saved 606 // The last cursor that was active before the current one was selected. Saved
626 // so that we can restore it. 607 // so that we can restore it.
627 gfx::NativeCursor previous_cursor_; 608 gfx::NativeCursor previous_cursor_;
628 609
629 ViewProps props_; 610 ViewProps props_;
630 611
631 // True if we're in fullscreen mode. 612 // True if we're in fullscreen mode.
632 bool fullscreen_; 613 bool fullscreen_;
633 614
634 // True if we're in metro snap mode.
635 bool metro_snap_;
636
637 // If this is greater than zero, we should prevent attempts to make the window 615 // If this is greater than zero, we should prevent attempts to make the window
638 // visible when we handle WM_WINDOWPOSCHANGING. Some calls like 616 // visible when we handle WM_WINDOWPOSCHANGING. Some calls like
639 // ShowWindow(SW_RESTORE) make the window visible in addition to restoring it, 617 // ShowWindow(SW_RESTORE) make the window visible in addition to restoring it,
640 // when all we want to do is restore it. 618 // when all we want to do is restore it.
641 int force_hidden_count_; 619 int force_hidden_count_;
642 620
643 // The window styles before we modified them for the drag frame appearance. 621 // The window styles before we modified them for the drag frame appearance.
644 DWORD drag_frame_saved_window_style_; 622 DWORD drag_frame_saved_window_style_;
645 DWORD drag_frame_saved_window_ex_style_; 623 DWORD drag_frame_saved_window_ex_style_;
646 624
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
684 662
685 // The set of touch devices currently down. 663 // The set of touch devices currently down.
686 TouchIDs touch_ids_; 664 TouchIDs touch_ids_;
687 665
688 DISALLOW_COPY_AND_ASSIGN(NativeWidgetWin); 666 DISALLOW_COPY_AND_ASSIGN(NativeWidgetWin);
689 }; 667 };
690 668
691 } // namespace views 669 } // namespace views
692 670
693 #endif // UI_VIEWS_WIDGET_NATIVE_WIDGET_WIN_H_ 671 #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