| 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 "ash/shell.h" | 8 #include "ash/shell.h" |
| 9 #include "base/command_line.h" | 9 #include "base/command_line.h" |
| 10 #include "base/files/file_util.h" | 10 #include "base/files/file_util.h" |
| 11 #include "base/strings/utf_string_conversions.h" | 11 #include "base/strings/utf_string_conversions.h" |
| 12 #include "base/threading/sequenced_worker_pool.h" | 12 #include "base/threading/sequenced_worker_pool.h" |
| 13 #include "chrome/browser/apps/per_app_settings_service.h" | 13 #include "chrome/browser/apps/per_app_settings_service.h" |
| 14 #include "chrome/browser/apps/per_app_settings_service_factory.h" | 14 #include "chrome/browser/apps/per_app_settings_service_factory.h" |
| 15 #include "chrome/browser/profiles/profile.h" | 15 #include "chrome/browser/profiles/profile.h" |
| 16 #include "chrome/browser/shell_integration.h" | 16 #include "chrome/browser/shell_integration.h" |
| 17 #include "chrome/browser/ui/views/apps/app_window_desktop_native_widget_aura_win
.h" | 17 #include "chrome/browser/ui/views/apps/app_window_desktop_native_widget_aura_win
.h" |
| 18 #include "chrome/browser/ui/views/apps/glass_app_window_frame_view_win.h" | 18 #include "chrome/browser/ui/views/apps/glass_app_window_frame_view_win.h" |
| 19 #include "chrome/browser/web_applications/web_app.h" | 19 #include "chrome/browser/web_applications/web_app.h" |
| 20 #include "chrome/browser/web_applications/web_app_win.h" | 20 #include "chrome/browser/web_applications/web_app_win.h" |
| 21 #include "chrome/common/chrome_icon_resources_win.h" | 21 #include "chrome/common/chrome_icon_resources_win.h" |
| 22 #include "chrome/common/chrome_switches.h" | 22 #include "chrome/common/chrome_switches.h" |
| 23 #include "chrome/grit/generated_resources.h" | 23 #include "chrome/grit/generated_resources.h" |
| 24 #include "content/public/browser/browser_thread.h" | 24 #include "content/public/browser/browser_thread.h" |
| 25 #include "extensions/browser/app_window/app_window.h" | 25 #include "extensions/browser/app_window/app_window.h" |
| 26 #include "extensions/browser/app_window/app_window_registry.h" | 26 #include "extensions/browser/app_window/app_window_registry.h" |
| 27 #include "extensions/common/extension.h" | 27 #include "extensions/common/extension.h" |
| 28 #include "ui/aura/remote_window_tree_host_win.h" | |
| 29 #include "ui/base/l10n/l10n_util.h" | 28 #include "ui/base/l10n/l10n_util.h" |
| 30 #include "ui/base/win/shell.h" | 29 #include "ui/base/win/shell.h" |
| 31 #include "ui/views/widget/desktop_aura/desktop_native_widget_aura.h" | 30 #include "ui/views/widget/desktop_aura/desktop_native_widget_aura.h" |
| 32 #include "ui/views/win/hwnd_util.h" | 31 #include "ui/views/win/hwnd_util.h" |
| 33 | 32 |
| 34 ChromeNativeAppWindowViewsWin::ChromeNativeAppWindowViewsWin() | 33 ChromeNativeAppWindowViewsWin::ChromeNativeAppWindowViewsWin() |
| 35 : glass_frame_view_(NULL), is_translucent_(false), weak_ptr_factory_(this) { | 34 : glass_frame_view_(NULL), is_translucent_(false), weak_ptr_factory_(this) { |
| 36 } | 35 } |
| 37 | 36 |
| 38 ChromeNativeAppWindowViewsWin::~ChromeNativeAppWindowViewsWin() { | 37 ChromeNativeAppWindowViewsWin::~ChromeNativeAppWindowViewsWin() { |
| (...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 137 } | 136 } |
| 138 return ChromeNativeAppWindowViewsAura::CreateStandardDesktopAppFrame(); | 137 return ChromeNativeAppWindowViewsAura::CreateStandardDesktopAppFrame(); |
| 139 } | 138 } |
| 140 | 139 |
| 141 bool ChromeNativeAppWindowViewsWin::CanMinimize() const { | 140 bool ChromeNativeAppWindowViewsWin::CanMinimize() const { |
| 142 // Resizing on Windows breaks translucency if the window also has shape. | 141 // Resizing on Windows breaks translucency if the window also has shape. |
| 143 // See http://crbug.com/417947. | 142 // See http://crbug.com/417947. |
| 144 return ChromeNativeAppWindowViewsAura::CanMinimize() && | 143 return ChromeNativeAppWindowViewsAura::CanMinimize() && |
| 145 !(WidgetHasHitTestMask() && is_translucent_); | 144 !(WidgetHasHitTestMask() && is_translucent_); |
| 146 } | 145 } |
| OLD | NEW |