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

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

Issue 1920263003: Rename gfx::Display/Screen to display::Display/Screen in chrome (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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 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
11 #include "base/logging.h" 11 #include "base/logging.h"
12 #include "base/macros.h" 12 #include "base/macros.h"
13 #include "base/message_loop/message_loop.h" 13 #include "base/message_loop/message_loop.h"
14 #include "base/strings/utf_string_conversions.h" 14 #include "base/strings/utf_string_conversions.h"
15 #include "build/build_config.h" 15 #include "build/build_config.h"
16 #include "chrome/app/chrome_command_ids.h" 16 #include "chrome/app/chrome_command_ids.h"
17 #include "chrome/browser/lifetime/keep_alive_types.h" 17 #include "chrome/browser/lifetime/keep_alive_types.h"
18 #include "chrome/browser/lifetime/scoped_keep_alive.h" 18 #include "chrome/browser/lifetime/scoped_keep_alive.h"
19 #include "chrome/browser/profiles/profile.h" 19 #include "chrome/browser/profiles/profile.h"
20 #include "chrome/browser/ui/panels/panel.h" 20 #include "chrome/browser/ui/panels/panel.h"
21 #include "chrome/browser/ui/panels/panel_bounds_animation.h" 21 #include "chrome/browser/ui/panels/panel_bounds_animation.h"
22 #include "chrome/browser/ui/panels/panel_manager.h" 22 #include "chrome/browser/ui/panels/panel_manager.h"
23 #include "chrome/browser/ui/panels/stacked_panel_collection.h" 23 #include "chrome/browser/ui/panels/stacked_panel_collection.h"
24 #include "chrome/browser/ui/views/panels/panel_frame_view.h" 24 #include "chrome/browser/ui/views/panels/panel_frame_view.h"
25 #include "content/public/browser/render_view_host.h" 25 #include "content/public/browser/render_view_host.h"
26 #include "content/public/browser/render_widget_host_view.h" 26 #include "content/public/browser/render_widget_host_view.h"
27 #include "content/public/browser/web_contents.h" 27 #include "content/public/browser/web_contents.h"
28 #include "ui/content_accelerators/accelerator_util.h" 28 #include "ui/content_accelerators/accelerator_util.h"
29 #include "ui/display/screen.h"
29 #include "ui/gfx/image/image.h" 30 #include "ui/gfx/image/image.h"
30 #include "ui/gfx/path.h" 31 #include "ui/gfx/path.h"
31 #include "ui/gfx/screen.h"
32 #include "ui/views/controls/button/image_button.h" 32 #include "ui/views/controls/button/image_button.h"
33 #include "ui/views/controls/webview/webview.h" 33 #include "ui/views/controls/webview/webview.h"
34 #include "ui/views/widget/widget.h" 34 #include "ui/views/widget/widget.h"
35 35
36 #if defined(OS_WIN) 36 #if defined(OS_WIN)
37 #include "base/win/windows_version.h" 37 #include "base/win/windows_version.h"
38 #include "chrome/browser/shell_integration_win.h" 38 #include "chrome/browser/shell_integration_win.h"
39 #include "chrome/browser/ui/views/panels/taskbar_window_thumbnailer_win.h" 39 #include "chrome/browser/ui/views/panels/taskbar_window_thumbnailer_win.h"
40 #include "ui/base/win/shell.h" 40 #include "ui/base/win/shell.h"
41 #include "ui/gfx/icon_util.h" 41 #include "ui/gfx/icon_util.h"
(...skipping 963 matching lines...) Expand 10 before | Expand all | Expand 10 after
1005 // clicking on its titlebar. This is the workaround to support restoring the 1005 // clicking on its titlebar. This is the workaround to support restoring the
1006 // minimized panel by other means, like alt-tabbing, win-tabbing, or clicking 1006 // minimized panel by other means, like alt-tabbing, win-tabbing, or clicking
1007 // the taskbar icon. Note that this workaround does not work for one edge 1007 // the taskbar icon. Note that this workaround does not work for one edge
1008 // case: the mouse happens to be at the minimized panel when the user tries to 1008 // case: the mouse happens to be at the minimized panel when the user tries to
1009 // bring up the panel with the above alternatives. 1009 // bring up the panel with the above alternatives.
1010 // When the user clicks on the minimized panel, the panel expansion will be 1010 // When the user clicks on the minimized panel, the panel expansion will be
1011 // done when we process the mouse button pressed message. 1011 // done when we process the mouse button pressed message.
1012 #if defined(OS_WIN) 1012 #if defined(OS_WIN)
1013 if (focused_ && panel_->IsMinimized() && 1013 if (focused_ && panel_->IsMinimized() &&
1014 panel_->collection()->type() == PanelCollection::DOCKED && 1014 panel_->collection()->type() == PanelCollection::DOCKED &&
1015 gfx::Screen::GetScreen()->GetWindowUnderCursor() != 1015 display::Screen::GetScreen()->GetWindowUnderCursor() !=
1016 widget->GetNativeWindow()) { 1016 widget->GetNativeWindow()) {
1017 panel_->Restore(); 1017 panel_->Restore();
1018 } 1018 }
1019 #endif 1019 #endif
1020 1020
1021 panel()->OnActiveStateChanged(focused); 1021 panel()->OnActiveStateChanged(focused);
1022 1022
1023 // Give web contents view a chance to set focus to the appropriate element. 1023 // Give web contents view a chance to set focus to the appropriate element.
1024 if (focused_) { 1024 if (focused_) {
1025 content::WebContents* web_contents = panel_->GetWebContents(); 1025 content::WebContents* web_contents = panel_->GetWebContents();
(...skipping 118 matching lines...) Expand 10 before | Expand all | Expand 10 after
1144 // SWP_FRAMECHANGED flag must be called in order for the cached window data 1144 // SWP_FRAMECHANGED flag must be called in order for the cached window data
1145 // to be updated properly. 1145 // to be updated properly.
1146 // http://msdn.microsoft.com/en-us/library/windows/desktop/ms633591(v=vs.85).a spx 1146 // http://msdn.microsoft.com/en-us/library/windows/desktop/ms633591(v=vs.85).a spx
1147 if (update_frame) { 1147 if (update_frame) {
1148 ::SetWindowPos(native_window, NULL, 0, 0, 0, 0, 1148 ::SetWindowPos(native_window, NULL, 0, 0, 0, 0,
1149 SWP_FRAMECHANGED | SWP_NOMOVE | SWP_NOSIZE | 1149 SWP_FRAMECHANGED | SWP_NOMOVE | SWP_NOSIZE |
1150 SWP_NOZORDER | SWP_NOACTIVATE); 1150 SWP_NOZORDER | SWP_NOACTIVATE);
1151 } 1151 }
1152 } 1152 }
1153 #endif 1153 #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