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

Side by Side Diff: chrome/browser/ui/views/panels/panel_view.cc

Issue 2186813002: Linux: Support the --class argument (Reland) (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Revert gtk2_util.cc Created 4 years, 4 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
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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/panels/panel_view.h" 5 #include "chrome/browser/ui/views/panels/panel_view.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 #include <map> 8 #include <map>
9 #include <utility> 9 #include <utility>
10 10
(...skipping 274 matching lines...) Expand 10 before | Expand all | Expand 10 after
285 window_ = new views::Widget; 285 window_ = new views::Widget;
286 views::Widget::InitParams params(views::Widget::InitParams::TYPE_WINDOW); 286 views::Widget::InitParams params(views::Widget::InitParams::TYPE_WINDOW);
287 params.delegate = this; 287 params.delegate = this;
288 params.remove_standard_frame = true; 288 params.remove_standard_frame = true;
289 params.keep_on_top = always_on_top; 289 params.keep_on_top = always_on_top;
290 params.visible_on_all_workspaces = always_on_top; 290 params.visible_on_all_workspaces = always_on_top;
291 params.bounds = bounds; 291 params.bounds = bounds;
292 292
293 #if defined(USE_X11) && !defined(OS_CHROMEOS) 293 #if defined(USE_X11) && !defined(OS_CHROMEOS)
294 params.wm_class_name = web_app::GetWMClassFromAppName(panel->app_name()); 294 params.wm_class_name = web_app::GetWMClassFromAppName(panel->app_name());
295 params.wm_class_class = shell_integration_linux::GetProgramClassName(); 295 params.wm_class_class = shell_integration_linux::GetProgramClassClass();
296 #endif 296 #endif
297 297
298 window_->Init(params); 298 window_->Init(params);
299 window_->set_frame_type(views::Widget::FRAME_TYPE_FORCE_CUSTOM); 299 window_->set_frame_type(views::Widget::FRAME_TYPE_FORCE_CUSTOM);
300 window_->set_focus_on_creation(false); 300 window_->set_focus_on_creation(false);
301 window_->AddObserver(this); 301 window_->AddObserver(this);
302 302
303 #if !defined(USE_ASH) 303 #if !defined(USE_ASH)
304 // Prevent the browser process from shutting down while this window is open. 304 // Prevent the browser process from shutting down while this window is open.
305 // Chrome OS already has a mechanism to always stay alive and skips this. 305 // Chrome OS already has a mechanism to always stay alive and skips this.
(...skipping 838 matching lines...) Expand 10 before | Expand all | Expand 10 after
1144 // SWP_FRAMECHANGED flag must be called in order for the cached window data 1144 // SWP_FRAMECHANGED flag must be called in order for the cached window data
1145 // to be updated properly. 1145 // to be updated properly.
1146 // http://msdn.microsoft.com/en-us/library/windows/desktop/ms633591(v=vs.85).a spx 1146 // http://msdn.microsoft.com/en-us/library/windows/desktop/ms633591(v=vs.85).a spx
1147 if (update_frame) { 1147 if (update_frame) {
1148 ::SetWindowPos(native_window, NULL, 0, 0, 0, 0, 1148 ::SetWindowPos(native_window, NULL, 0, 0, 0, 0,
1149 SWP_FRAMECHANGED | SWP_NOMOVE | SWP_NOSIZE | 1149 SWP_FRAMECHANGED | SWP_NOMOVE | SWP_NOSIZE |
1150 SWP_NOZORDER | SWP_NOACTIVATE); 1150 SWP_NOZORDER | SWP_NOACTIVATE);
1151 } 1151 }
1152 } 1152 }
1153 #endif 1153 #endif
OLDNEW
« no previous file with comments | « chrome/browser/ui/views/frame/desktop_browser_frame_auralinux.cc ('k') | chrome/common/chrome_switches.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698