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