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

Side by Side Diff: chrome/browser/ui/views/frame/browser_frame.cc

Issue 181503009: Rename BaseNativeAppWindowViews and NativeAppWindowViews (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase (native_app_window) Created 6 years, 9 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 (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/frame/browser_frame.h" 5 #include "chrome/browser/ui/views/frame/browser_frame.h"
6 6
7 #include "ash/shell.h" 7 #include "ash/shell.h"
8 #include "base/command_line.h" 8 #include "base/command_line.h"
9 #include "base/debug/leak_annotations.h" 9 #include "base/debug/leak_annotations.h"
10 #include "base/i18n/rtl.h" 10 #include "base/i18n/rtl.h"
(...skipping 104 matching lines...) Expand 10 before | Expand all | Expand 10 after
115 #if defined(OS_LINUX) && !defined(OS_CHROMEOS) 115 #if defined(OS_LINUX) && !defined(OS_CHROMEOS)
116 // Set up a custom WM_CLASS for some sorts of window types. This allows 116 // Set up a custom WM_CLASS for some sorts of window types. This allows
117 // task switchers in X11 environments to distinguish between main browser 117 // task switchers in X11 environments to distinguish between main browser
118 // windows and e.g app windows. 118 // windows and e.g app windows.
119 const CommandLine& command_line = *CommandLine::ForCurrentProcess(); 119 const CommandLine& command_line = *CommandLine::ForCurrentProcess();
120 const Browser& browser = *browser_view_->browser(); 120 const Browser& browser = *browser_view_->browser();
121 params.wm_class_class = ShellIntegrationLinux::GetProgramClassName(); 121 params.wm_class_class = ShellIntegrationLinux::GetProgramClassName();
122 params.wm_class_name = params.wm_class_class; 122 params.wm_class_name = params.wm_class_class;
123 if (browser.is_app() && !browser.is_devtools()) { 123 if (browser.is_app() && !browser.is_devtools()) {
124 // This window is a hosted app or v1 packaged app. 124 // This window is a hosted app or v1 packaged app.
125 // NOTE: v2 packaged app windows are created by NativeAppWindowViews. 125 // NOTE: v2 packaged app windows are created by ChromeNativeAppWindowViews.
126 params.wm_class_name = web_app::GetWMClassFromAppName(browser.app_name()); 126 params.wm_class_name = web_app::GetWMClassFromAppName(browser.app_name());
127 } else if (command_line.HasSwitch(switches::kUserDataDir)) { 127 } else if (command_line.HasSwitch(switches::kUserDataDir)) {
128 // Set the class name to e.g. "Chrome (/tmp/my-user-data)". The 128 // Set the class name to e.g. "Chrome (/tmp/my-user-data)". The
129 // class name will show up in the alt-tab list in gnome-shell if 129 // class name will show up in the alt-tab list in gnome-shell if
130 // you're running a binary that doesn't have a matching .desktop 130 // you're running a binary that doesn't have a matching .desktop
131 // file. 131 // file.
132 const std::string user_data_dir = 132 const std::string user_data_dir =
133 command_line.GetSwitchValueNative(switches::kUserDataDir); 133 command_line.GetSwitchValueNative(switches::kUserDataDir);
134 params.wm_class_name += " (" + user_data_dir + ")"; 134 params.wm_class_name += " (" + user_data_dir + ")";
135 } 135 }
(...skipping 155 matching lines...) Expand 10 before | Expand all | Expand 10 after
291 return !IsMaximized(); 291 return !IsMaximized();
292 } 292 }
293 #endif // OS_WIN 293 #endif // OS_WIN
294 294
295 void BrowserFrame::OnUseCustomChromeFrameChanged() { 295 void BrowserFrame::OnUseCustomChromeFrameChanged() {
296 // Tell the window manager to add or remove system borders. 296 // Tell the window manager to add or remove system borders.
297 set_frame_type(UseCustomFrame() ? Widget::FRAME_TYPE_FORCE_CUSTOM 297 set_frame_type(UseCustomFrame() ? Widget::FRAME_TYPE_FORCE_CUSTOM
298 : Widget::FRAME_TYPE_FORCE_NATIVE); 298 : Widget::FRAME_TYPE_FORCE_NATIVE);
299 FrameTypeChanged(); 299 FrameTypeChanged();
300 } 300 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/views/apps/shaped_app_window_targeter_unittest.cc ('k') | chrome/chrome_browser_ui.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698