| 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" |
| (...skipping 197 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 208 std::string app_name = web_app::GenerateApplicationNameFromExtensionId( | 208 std::string app_name = web_app::GenerateApplicationNameFromExtensionId( |
| 209 app_window()->extension_id()); | 209 app_window()->extension_id()); |
| 210 | 210 |
| 211 views::Widget::InitParams init_params(views::Widget::InitParams::TYPE_WINDOW); | 211 views::Widget::InitParams init_params(views::Widget::InitParams::TYPE_WINDOW); |
| 212 init_params.delegate = this; | 212 init_params.delegate = this; |
| 213 init_params.remove_standard_frame = IsFrameless() || has_frame_color_; | 213 init_params.remove_standard_frame = IsFrameless() || has_frame_color_; |
| 214 init_params.use_system_default_icon = true; | 214 init_params.use_system_default_icon = true; |
| 215 if (create_params.alpha_enabled) | 215 if (create_params.alpha_enabled) |
| 216 init_params.opacity = views::Widget::InitParams::TRANSLUCENT_WINDOW; | 216 init_params.opacity = views::Widget::InitParams::TRANSLUCENT_WINDOW; |
| 217 init_params.keep_on_top = create_params.always_on_top; | 217 init_params.keep_on_top = create_params.always_on_top; |
| 218 init_params.visible_on_all_workspaces = |
| 219 create_params.visible_on_all_workspaces; |
| 218 | 220 |
| 219 #if defined(OS_LINUX) && !defined(OS_CHROMEOS) | 221 #if defined(OS_LINUX) && !defined(OS_CHROMEOS) |
| 220 // Set up a custom WM_CLASS for app windows. This allows task switchers in | 222 // Set up a custom WM_CLASS for app windows. This allows task switchers in |
| 221 // X11 environments to distinguish them from main browser windows. | 223 // X11 environments to distinguish them from main browser windows. |
| 222 init_params.wm_class_name = web_app::GetWMClassFromAppName(app_name); | 224 init_params.wm_class_name = web_app::GetWMClassFromAppName(app_name); |
| 223 init_params.wm_class_class = shell_integration_linux::GetProgramClassName(); | 225 init_params.wm_class_class = shell_integration_linux::GetProgramClassName(); |
| 224 const char kX11WindowRoleApp[] = "app"; | 226 const char kX11WindowRoleApp[] = "app"; |
| 225 init_params.wm_role_name = std::string(kX11WindowRoleApp); | 227 init_params.wm_role_name = std::string(kX11WindowRoleApp); |
| 226 #endif | 228 #endif |
| 227 | 229 |
| (...skipping 470 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 698 InitializePanelWindow(create_params); | 700 InitializePanelWindow(create_params); |
| 699 } else { | 701 } else { |
| 700 InitializeDefaultWindow(create_params); | 702 InitializeDefaultWindow(create_params); |
| 701 } | 703 } |
| 702 extension_keybinding_registry_.reset(new ExtensionKeybindingRegistryViews( | 704 extension_keybinding_registry_.reset(new ExtensionKeybindingRegistryViews( |
| 703 Profile::FromBrowserContext(app_window->browser_context()), | 705 Profile::FromBrowserContext(app_window->browser_context()), |
| 704 widget()->GetFocusManager(), | 706 widget()->GetFocusManager(), |
| 705 extensions::ExtensionKeybindingRegistry::PLATFORM_APPS_ONLY, | 707 extensions::ExtensionKeybindingRegistry::PLATFORM_APPS_ONLY, |
| 706 NULL)); | 708 NULL)); |
| 707 } | 709 } |
| OLD | NEW |