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

Side by Side Diff: chrome/browser/ui/views/panels/panel_view.cc

Issue 1608733002: Remove ui/gfx/screen_type_delegate.h (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@metro-mode-4
Patch Set: and another rebase Created 4 years, 11 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 #include "chrome/browser/ui/views/panels/panel_view.h" 5 #include "chrome/browser/ui/views/panels/panel_view.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 #include <map> 8 #include <map>
9 #include <utility> 9 #include <utility>
10 10
(...skipping 993 matching lines...) Expand 10 before | Expand all | Expand 10 after
1004 // clicking on its titlebar. This is the workaround to support restoring the 1004 // clicking on its titlebar. This is the workaround to support restoring the
1005 // minimized panel by other means, like alt-tabbing, win-tabbing, or clicking 1005 // minimized panel by other means, like alt-tabbing, win-tabbing, or clicking
1006 // the taskbar icon. Note that this workaround does not work for one edge 1006 // the taskbar icon. Note that this workaround does not work for one edge
1007 // case: the mouse happens to be at the minimized panel when the user tries to 1007 // case: the mouse happens to be at the minimized panel when the user tries to
1008 // bring up the panel with the above alternatives. 1008 // bring up the panel with the above alternatives.
1009 // When the user clicks on the minimized panel, the panel expansion will be 1009 // When the user clicks on the minimized panel, the panel expansion will be
1010 // done when we process the mouse button pressed message. 1010 // done when we process the mouse button pressed message.
1011 #if defined(OS_WIN) 1011 #if defined(OS_WIN)
1012 if (focused_ && panel_->IsMinimized() && 1012 if (focused_ && panel_->IsMinimized() &&
1013 panel_->collection()->type() == PanelCollection::DOCKED && 1013 panel_->collection()->type() == PanelCollection::DOCKED &&
1014 gfx::Screen::GetScreenFor(widget->GetNativeWindow())-> 1014 gfx::Screen::GetScreen()->GetWindowUnderCursor() !=
1015 GetWindowUnderCursor() != widget->GetNativeWindow()) { 1015 widget->GetNativeWindow()) {
1016 panel_->Restore(); 1016 panel_->Restore();
1017 } 1017 }
1018 #endif 1018 #endif
1019 1019
1020 panel()->OnActiveStateChanged(focused); 1020 panel()->OnActiveStateChanged(focused);
1021 1021
1022 // Give web contents view a chance to set focus to the appropriate element. 1022 // Give web contents view a chance to set focus to the appropriate element.
1023 if (focused_) { 1023 if (focused_) {
1024 content::WebContents* web_contents = panel_->GetWebContents(); 1024 content::WebContents* web_contents = panel_->GetWebContents();
1025 if (web_contents) 1025 if (web_contents)
(...skipping 117 matching lines...) Expand 10 before | Expand all | Expand 10 after
1143 // SWP_FRAMECHANGED flag must be called in order for the cached window data 1143 // SWP_FRAMECHANGED flag must be called in order for the cached window data
1144 // to be updated properly. 1144 // to be updated properly.
1145 // http://msdn.microsoft.com/en-us/library/windows/desktop/ms633591(v=vs.85).a spx 1145 // http://msdn.microsoft.com/en-us/library/windows/desktop/ms633591(v=vs.85).a spx
1146 if (update_frame) { 1146 if (update_frame) {
1147 ::SetWindowPos(native_window, NULL, 0, 0, 0, 0, 1147 ::SetWindowPos(native_window, NULL, 0, 0, 0, 0,
1148 SWP_FRAMECHANGED | SWP_NOMOVE | SWP_NOSIZE | 1148 SWP_FRAMECHANGED | SWP_NOMOVE | SWP_NOSIZE |
1149 SWP_NOZORDER | SWP_NOACTIVATE); 1149 SWP_NOZORDER | SWP_NOACTIVATE);
1150 } 1150 }
1151 } 1151 }
1152 #endif 1152 #endif
OLDNEW
« no previous file with comments | « chrome/browser/ui/views/panels/panel_frame_view.cc ('k') | chrome/browser/ui/views/profiles/user_manager_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698