OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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/apps/chrome_native_app_window_views_win.h" | 5 #include "chrome/browser/ui/views/apps/chrome_native_app_window_views_win.h" |
6 | 6 |
7 #include "apps/ui/views/app_window_frame_view.h" | 7 #include "apps/ui/views/app_window_frame_view.h" |
8 #include "base/command_line.h" | 8 #include "base/command_line.h" |
9 #include "base/files/file_util.h" | 9 #include "base/files/file_util.h" |
10 #include "base/strings/utf_string_conversions.h" | 10 #include "base/strings/utf_string_conversions.h" |
11 #include "base/threading/sequenced_worker_pool.h" | 11 #include "base/threading/sequenced_worker_pool.h" |
12 #include "chrome/browser/apps/per_app_settings_service.h" | 12 #include "chrome/browser/apps/per_app_settings_service.h" |
13 #include "chrome/browser/apps/per_app_settings_service_factory.h" | 13 #include "chrome/browser/apps/per_app_settings_service_factory.h" |
14 #include "chrome/browser/profiles/profile.h" | 14 #include "chrome/browser/profiles/profile.h" |
15 #include "chrome/browser/shell_integration.h" | 15 #include "chrome/browser/shell_integration.h" |
16 #include "chrome/browser/ui/views/apps/app_window_desktop_native_widget_aura_win
.h" | 16 #include "chrome/browser/ui/views/apps/app_window_desktop_native_widget_aura_win
.h" |
17 #include "chrome/browser/ui/views/apps/glass_app_window_frame_view_win.h" | 17 #include "chrome/browser/ui/views/apps/glass_app_window_frame_view_win.h" |
18 #include "chrome/browser/web_applications/web_app.h" | 18 #include "chrome/browser/web_applications/web_app.h" |
19 #include "chrome/browser/web_applications/web_app_win.h" | 19 #include "chrome/browser/web_applications/web_app_win.h" |
20 #include "chrome/common/chrome_icon_resources_win.h" | 20 #include "chrome/common/chrome_icon_resources_win.h" |
21 #include "chrome/common/chrome_switches.h" | 21 #include "chrome/common/chrome_switches.h" |
22 #include "chrome/grit/generated_resources.h" | 22 #include "chrome/grit/generated_resources.h" |
23 #include "content/public/browser/browser_thread.h" | 23 #include "content/public/browser/browser_thread.h" |
24 #include "extensions/browser/app_window/app_window.h" | 24 #include "extensions/browser/app_window/app_window.h" |
25 #include "extensions/browser/app_window/app_window_registry.h" | 25 #include "extensions/browser/app_window/app_window_registry.h" |
26 #include "extensions/common/extension.h" | 26 #include "extensions/common/extension.h" |
27 #include "ui/aura/remote_window_tree_host_win.h" | |
28 #include "ui/base/l10n/l10n_util.h" | 27 #include "ui/base/l10n/l10n_util.h" |
29 #include "ui/base/win/shell.h" | 28 #include "ui/base/win/shell.h" |
30 #include "ui/views/widget/desktop_aura/desktop_native_widget_aura.h" | 29 #include "ui/views/widget/desktop_aura/desktop_native_widget_aura.h" |
31 #include "ui/views/win/hwnd_util.h" | 30 #include "ui/views/win/hwnd_util.h" |
32 | 31 |
33 ChromeNativeAppWindowViewsWin::ChromeNativeAppWindowViewsWin() | 32 ChromeNativeAppWindowViewsWin::ChromeNativeAppWindowViewsWin() |
34 : glass_frame_view_(NULL), is_translucent_(false), weak_ptr_factory_(this) { | 33 : glass_frame_view_(NULL), is_translucent_(false), weak_ptr_factory_(this) { |
35 } | 34 } |
36 | 35 |
37 ChromeNativeAppWindowViewsWin::~ChromeNativeAppWindowViewsWin() { | 36 ChromeNativeAppWindowViewsWin::~ChromeNativeAppWindowViewsWin() { |
(...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
118 } | 117 } |
119 return ChromeNativeAppWindowViewsAura::CreateStandardDesktopAppFrame(); | 118 return ChromeNativeAppWindowViewsAura::CreateStandardDesktopAppFrame(); |
120 } | 119 } |
121 | 120 |
122 bool ChromeNativeAppWindowViewsWin::CanMinimize() const { | 121 bool ChromeNativeAppWindowViewsWin::CanMinimize() const { |
123 // Resizing on Windows breaks translucency if the window also has shape. | 122 // Resizing on Windows breaks translucency if the window also has shape. |
124 // See http://crbug.com/417947. | 123 // See http://crbug.com/417947. |
125 return ChromeNativeAppWindowViewsAura::CanMinimize() && | 124 return ChromeNativeAppWindowViewsAura::CanMinimize() && |
126 !(WidgetHasHitTestMask() && is_translucent_); | 125 !(WidgetHasHitTestMask() && is_translucent_); |
127 } | 126 } |
OLD | NEW |