| 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 238 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 249 views::Widget* widget) {} | 249 views::Widget* widget) {} |
| 250 | 250 |
| 251 void NativeAppWindowViews::InitializeDefaultWindow( | 251 void NativeAppWindowViews::InitializeDefaultWindow( |
| 252 const ShellWindow::CreateParams& create_params) { | 252 const ShellWindow::CreateParams& create_params) { |
| 253 std::string app_name = | 253 std::string app_name = |
| 254 web_app::GenerateApplicationNameFromExtensionId(extension()->id()); | 254 web_app::GenerateApplicationNameFromExtensionId(extension()->id()); |
| 255 | 255 |
| 256 views::Widget::InitParams init_params(views::Widget::InitParams::TYPE_WINDOW); | 256 views::Widget::InitParams init_params(views::Widget::InitParams::TYPE_WINDOW); |
| 257 init_params.delegate = this; | 257 init_params.delegate = this; |
| 258 init_params.remove_standard_frame = ShouldUseChromeStyleFrame(); | 258 init_params.remove_standard_frame = ShouldUseChromeStyleFrame(); |
| 259 #if defined(OS_LINUX) && !defined(OS_CHROMEOS) | |
| 260 // On Linux, remove the standard frame. Instead, we will use CustomFrameView | |
| 261 // to draw a native-like frame. | |
| 262 // TODO(mgiuca): Remove this during fix for http://crbug.com/322256. | |
| 263 init_params.remove_standard_frame = true; | |
| 264 #endif | |
| 265 init_params.use_system_default_icon = true; | 259 init_params.use_system_default_icon = true; |
| 266 // TODO(erg): Conceptually, these are toplevel windows, but we theoretically | 260 // TODO(erg): Conceptually, these are toplevel windows, but we theoretically |
| 267 // could plumb context through to here in some cases. | 261 // could plumb context through to here in some cases. |
| 268 init_params.top_level = true; | 262 init_params.top_level = true; |
| 269 if (create_params.transparent_background) | 263 if (create_params.transparent_background) |
| 270 init_params.opacity = views::Widget::InitParams::TRANSLUCENT_WINDOW; | 264 init_params.opacity = views::Widget::InitParams::TRANSLUCENT_WINDOW; |
| 271 init_params.keep_on_top = create_params.always_on_top; | 265 init_params.keep_on_top = create_params.always_on_top; |
| 272 gfx::Rect window_bounds = create_params.bounds; | 266 gfx::Rect window_bounds = create_params.bounds; |
| 273 bool position_specified = | 267 bool position_specified = |
| 274 window_bounds.x() != INT_MIN && window_bounds.y() != INT_MIN; | 268 window_bounds.x() != INT_MIN && window_bounds.y() != INT_MIN; |
| (...skipping 690 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 965 gfx::Rect client_bounds = gfx::Rect(1000, 1000); | 959 gfx::Rect client_bounds = gfx::Rect(1000, 1000); |
| 966 gfx::Rect window_bounds = | 960 gfx::Rect window_bounds = |
| 967 window_->non_client_view()->GetWindowBoundsForClientBounds( | 961 window_->non_client_view()->GetWindowBoundsForClientBounds( |
| 968 client_bounds); | 962 client_bounds); |
| 969 return window_bounds.InsetsFrom(client_bounds); | 963 return window_bounds.InsetsFrom(client_bounds); |
| 970 } | 964 } |
| 971 | 965 |
| 972 void NativeAppWindowViews::HideWithApp() {} | 966 void NativeAppWindowViews::HideWithApp() {} |
| 973 void NativeAppWindowViews::ShowWithApp() {} | 967 void NativeAppWindowViews::ShowWithApp() {} |
| 974 void NativeAppWindowViews::UpdateWindowMinMaxSize() {} | 968 void NativeAppWindowViews::UpdateWindowMinMaxSize() {} |
| OLD | NEW |