Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(165)

Side by Side Diff: chrome/browser/ui/views/apps/chrome_native_app_window_views.cc

Issue 469993003: Add AppWindow.setVisibleOnAllWorkspaces. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Initialize AppWindow::CreateParams::visible_on_all_workspaces. Created 6 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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
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 440 matching lines...) Expand 10 before | Expand all | Expand 10 after
668 InitializePanelWindow(create_params); 670 InitializePanelWindow(create_params);
669 } else { 671 } else {
670 InitializeDefaultWindow(create_params); 672 InitializeDefaultWindow(create_params);
671 } 673 }
672 extension_keybinding_registry_.reset(new ExtensionKeybindingRegistryViews( 674 extension_keybinding_registry_.reset(new ExtensionKeybindingRegistryViews(
673 Profile::FromBrowserContext(app_window->browser_context()), 675 Profile::FromBrowserContext(app_window->browser_context()),
674 widget()->GetFocusManager(), 676 widget()->GetFocusManager(),
675 extensions::ExtensionKeybindingRegistry::PLATFORM_APPS_ONLY, 677 extensions::ExtensionKeybindingRegistry::PLATFORM_APPS_ONLY,
676 NULL)); 678 NULL));
677 } 679 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/cocoa/apps/native_app_window_cocoa.mm ('k') | chrome/common/extensions/api/_api_features.json » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698