| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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/native_app_window_views.h" | 5 #include "chrome/browser/ui/views/apps/native_app_window_views.h" |
| 6 | 6 |
| 7 #include "apps/shell_window.h" | 7 #include "apps/shell_window.h" |
| 8 #include "apps/ui/views/shell_window_frame_view.h" | 8 #include "apps/ui/views/shell_window_frame_view.h" |
| 9 #include "base/command_line.h" | 9 #include "base/command_line.h" |
| 10 #include "base/file_util.h" | 10 #include "base/file_util.h" |
| (...skipping 30 matching lines...) Expand all Loading... |
| 41 #include "ui/views/win/hwnd_util.h" | 41 #include "ui/views/win/hwnd_util.h" |
| 42 #endif | 42 #endif |
| 43 | 43 |
| 44 #if defined(OS_LINUX) | 44 #if defined(OS_LINUX) |
| 45 #include "chrome/browser/shell_integration_linux.h" | 45 #include "chrome/browser/shell_integration_linux.h" |
| 46 #endif | 46 #endif |
| 47 | 47 |
| 48 #if defined(USE_ASH) | 48 #if defined(USE_ASH) |
| 49 #include "ash/ash_constants.h" | 49 #include "ash/ash_constants.h" |
| 50 #include "ash/ash_switches.h" | 50 #include "ash/ash_switches.h" |
| 51 #include "ash/screen_ash.h" | 51 #include "ash/screen_util.h" |
| 52 #include "ash/shell.h" | 52 #include "ash/shell.h" |
| 53 #include "ash/wm/custom_frame_view_ash.h" | 53 #include "ash/wm/custom_frame_view_ash.h" |
| 54 #include "ash/wm/immersive_fullscreen_controller.h" | 54 #include "ash/wm/immersive_fullscreen_controller.h" |
| 55 #include "ash/wm/panels/panel_frame_view.h" | 55 #include "ash/wm/panels/panel_frame_view.h" |
| 56 #include "ash/wm/window_state.h" | 56 #include "ash/wm/window_state.h" |
| 57 #include "ash/wm/window_state_delegate.h" | 57 #include "ash/wm/window_state_delegate.h" |
| 58 #include "ash/wm/window_state_observer.h" | 58 #include "ash/wm/window_state_observer.h" |
| 59 #include "chrome/browser/ui/ash/ash_util.h" | 59 #include "chrome/browser/ui/ash/ash_util.h" |
| 60 #include "ui/aura/client/aura_constants.h" | 60 #include "ui/aura/client/aura_constants.h" |
| 61 #include "ui/aura/client/window_tree_client.h" | 61 #include "ui/aura/client/window_tree_client.h" |
| (...skipping 292 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 354 preferred_size_.set_width(kMinPanelWidth); | 354 preferred_size_.set_width(kMinPanelWidth); |
| 355 | 355 |
| 356 if (preferred_size_.height() == 0) | 356 if (preferred_size_.height() == 0) |
| 357 preferred_size_.set_height(kDefaultPanelHeight); | 357 preferred_size_.set_height(kDefaultPanelHeight); |
| 358 else if (preferred_size_.height() < kMinPanelHeight) | 358 else if (preferred_size_.height() < kMinPanelHeight) |
| 359 preferred_size_.set_height(kMinPanelHeight); | 359 preferred_size_.set_height(kMinPanelHeight); |
| 360 #if defined(USE_ASH) | 360 #if defined(USE_ASH) |
| 361 if (ash::Shell::HasInstance()) { | 361 if (ash::Shell::HasInstance()) { |
| 362 // Open a new panel on the target root. | 362 // Open a new panel on the target root. |
| 363 aura::Window* target = ash::Shell::GetTargetRootWindow(); | 363 aura::Window* target = ash::Shell::GetTargetRootWindow(); |
| 364 params.bounds = ash::ScreenAsh::ConvertRectToScreen( | 364 params.bounds = ash::ScreenUtil::ConvertRectToScreen( |
| 365 target, gfx::Rect(preferred_size_)); | 365 target, gfx::Rect(preferred_size_)); |
| 366 } else { | 366 } else { |
| 367 params.bounds = gfx::Rect(preferred_size_); | 367 params.bounds = gfx::Rect(preferred_size_); |
| 368 } | 368 } |
| 369 #else | 369 #else |
| 370 params.bounds = gfx::Rect(preferred_size_); | 370 params.bounds = gfx::Rect(preferred_size_); |
| 371 #endif | 371 #endif |
| 372 // TODO(erg): Conceptually, these are toplevel windows, but we theoretically | 372 // TODO(erg): Conceptually, these are toplevel windows, but we theoretically |
| 373 // could plumb context through to here in some cases. | 373 // could plumb context through to here in some cases. |
| 374 params.top_level = true; | 374 params.top_level = true; |
| (...skipping 585 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 960 gfx::Rect client_bounds = gfx::Rect(1000, 1000); | 960 gfx::Rect client_bounds = gfx::Rect(1000, 1000); |
| 961 gfx::Rect window_bounds = | 961 gfx::Rect window_bounds = |
| 962 window_->non_client_view()->GetWindowBoundsForClientBounds( | 962 window_->non_client_view()->GetWindowBoundsForClientBounds( |
| 963 client_bounds); | 963 client_bounds); |
| 964 return window_bounds.InsetsFrom(client_bounds); | 964 return window_bounds.InsetsFrom(client_bounds); |
| 965 } | 965 } |
| 966 | 966 |
| 967 void NativeAppWindowViews::HideWithApp() {} | 967 void NativeAppWindowViews::HideWithApp() {} |
| 968 void NativeAppWindowViews::ShowWithApp() {} | 968 void NativeAppWindowViews::ShowWithApp() {} |
| 969 void NativeAppWindowViews::UpdateWindowMinMaxSize() {} | 969 void NativeAppWindowViews::UpdateWindowMinMaxSize() {} |
| OLD | NEW |