| 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.h" | 5 #include "chrome/browser/ui/views/apps/chrome_native_app_window_views.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 "chrome/app/chrome_command_ids.h" | 9 #include "chrome/app/chrome_command_ids.h" |
| 10 #include "chrome/browser/app_mode/app_mode_utils.h" | 10 #include "chrome/browser/app_mode/app_mode_utils.h" |
| 11 #include "chrome/browser/chrome_page_zoom.h" | 11 #include "chrome/browser/chrome_page_zoom.h" |
| 12 #include "chrome/browser/favicon/favicon_tab_helper.h" | 12 #include "chrome/browser/favicon/favicon_tab_helper.h" |
| 13 #include "chrome/browser/profiles/profile.h" | 13 #include "chrome/browser/profiles/profile.h" |
| 14 #include "chrome/browser/ui/host_desktop.h" | 14 #include "chrome/browser/ui/host_desktop.h" |
| 15 #include "chrome/browser/ui/views/apps/shaped_app_window_targeter.h" | 15 #include "chrome/browser/ui/views/apps/shaped_app_window_targeter.h" |
| 16 #include "chrome/browser/ui/views/extensions/extension_keybinding_registry_views
.h" | 16 #include "chrome/browser/ui/views/extensions/extension_keybinding_registry_views
.h" |
| 17 #include "chrome/browser/ui/views/frame/taskbar_decorator.h" | 17 #include "chrome/browser/ui/views/frame/taskbar_decorator.h" |
| 18 #include "chrome/browser/web_applications/web_app.h" | 18 #include "chrome/browser/web_applications/web_app.h" |
| 19 #include "chrome/common/chrome_switches.h" | 19 #include "chrome/common/chrome_switches.h" |
| 20 #include "extensions/common/extension.h" | 20 #include "extensions/common/extension.h" |
| 21 #include "ui/aura/window.h" |
| 21 #include "ui/base/hit_test.h" | 22 #include "ui/base/hit_test.h" |
| 22 #include "ui/base/models/simple_menu_model.h" | 23 #include "ui/base/models/simple_menu_model.h" |
| 23 #include "ui/gfx/image/image_skia.h" | 24 #include "ui/gfx/image/image_skia.h" |
| 24 #include "ui/views/controls/menu/menu_runner.h" | 25 #include "ui/views/controls/menu/menu_runner.h" |
| 25 #include "ui/views/controls/webview/webview.h" | 26 #include "ui/views/controls/webview/webview.h" |
| 26 #include "ui/views/widget/widget.h" | 27 #include "ui/views/widget/widget.h" |
| 27 #include "ui/wm/core/easy_resize_window_targeter.h" | 28 #include "ui/wm/core/easy_resize_window_targeter.h" |
| 28 #include "ui/wm/core/shadow_types.h" | 29 #include "ui/wm/core/shadow_types.h" |
| 29 | 30 |
| 30 #if defined(OS_LINUX) | 31 #if defined(OS_LINUX) |
| (...skipping 12 matching lines...) Expand all Loading... |
| 43 #include "ash/wm/window_state_delegate.h" | 44 #include "ash/wm/window_state_delegate.h" |
| 44 #include "ash/wm/window_state_observer.h" | 45 #include "ash/wm/window_state_observer.h" |
| 45 #include "chrome/browser/ui/ash/ash_util.h" | 46 #include "chrome/browser/ui/ash/ash_util.h" |
| 46 #include "chrome/browser/ui/ash/multi_user/multi_user_context_menu.h" | 47 #include "chrome/browser/ui/ash/multi_user/multi_user_context_menu.h" |
| 47 #include "ui/aura/client/aura_constants.h" | 48 #include "ui/aura/client/aura_constants.h" |
| 48 #include "ui/aura/client/window_tree_client.h" | 49 #include "ui/aura/client/window_tree_client.h" |
| 49 #include "ui/aura/window.h" | 50 #include "ui/aura/window.h" |
| 50 #include "ui/aura/window_observer.h" | 51 #include "ui/aura/window_observer.h" |
| 51 #endif | 52 #endif |
| 52 | 53 |
| 53 #if defined(USE_AURA) | |
| 54 #include "ui/aura/window.h" | |
| 55 #endif | |
| 56 | |
| 57 using apps::AppWindow; | 54 using apps::AppWindow; |
| 58 | 55 |
| 59 namespace { | 56 namespace { |
| 60 | 57 |
| 61 const int kMinPanelWidth = 100; | 58 const int kMinPanelWidth = 100; |
| 62 const int kMinPanelHeight = 100; | 59 const int kMinPanelHeight = 100; |
| 63 const int kDefaultPanelWidth = 200; | 60 const int kDefaultPanelWidth = 200; |
| 64 const int kDefaultPanelHeight = 300; | 61 const int kDefaultPanelHeight = 300; |
| 65 const int kResizeInsideBoundsSize = 5; | 62 const int kResizeInsideBoundsSize = 5; |
| 66 const int kResizeAreaCornerSize = 16; | 63 const int kResizeAreaCornerSize = 16; |
| (...skipping 620 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 687 NULL)); | 684 NULL)); |
| 688 | 685 |
| 689 #if !defined(OS_CHROMEOS) | 686 #if !defined(OS_CHROMEOS) |
| 690 if ((IsFrameless() || has_frame_color_) && | 687 if ((IsFrameless() || has_frame_color_) && |
| 691 chrome::GetHostDesktopTypeForNativeWindow(widget()->GetNativeWindow()) != | 688 chrome::GetHostDesktopTypeForNativeWindow(widget()->GetNativeWindow()) != |
| 692 chrome::HOST_DESKTOP_TYPE_ASH) { | 689 chrome::HOST_DESKTOP_TYPE_ASH) { |
| 693 InstallEasyResizeTargeterOnContainer(); | 690 InstallEasyResizeTargeterOnContainer(); |
| 694 } | 691 } |
| 695 #endif | 692 #endif |
| 696 } | 693 } |
| OLD | NEW |