Chromium Code Reviews| OLD | NEW |
|---|---|
| 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/i18n/rtl.h" | 9 #include "base/i18n/rtl.h" |
| 10 #include "chrome/browser/app_mode/app_mode_utils.h" | 10 #include "chrome/browser/app_mode/app_mode_utils.h" |
| (...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 89 // Typed panel/popup can only return a size once the widget has been | 89 // Typed panel/popup can only return a size once the widget has been |
| 90 // created. | 90 // created. |
| 91 chrome::GetSavedWindowBoundsAndShowState(browser_view_->browser(), | 91 chrome::GetSavedWindowBoundsAndShowState(browser_view_->browser(), |
| 92 ¶ms.bounds, | 92 ¶ms.bounds, |
| 93 ¶ms.show_state); | 93 ¶ms.show_state); |
| 94 } | 94 } |
| 95 #if defined(USE_ASH) | 95 #if defined(USE_ASH) |
| 96 if (browser_view_->browser()->host_desktop_type() == | 96 if (browser_view_->browser()->host_desktop_type() == |
| 97 chrome::HOST_DESKTOP_TYPE_ASH || chrome::ShouldOpenAshOnStartup()) { | 97 chrome::HOST_DESKTOP_TYPE_ASH || chrome::ShouldOpenAshOnStartup()) { |
| 98 params.context = ash::Shell::GetPrimaryRootWindow(); | 98 params.context = ash::Shell::GetPrimaryRootWindow(); |
| 99 | |
| 100 #if defined(OS_WIN) | |
| 101 // If this window is under ASH on Windows, we need it to be translucent. | |
| 102 // TODO(shrikant): Instead of #if, this logic can possibly be moved to | |
|
scottmg
2013/12/06 22:00:17
I think just delete this TODO.
sky
2013/12/11 21:17:28
Ah, that's right. In that case isn't the better fi
Shrikant Kelkar
2013/12/11 21:58:37
Please correct me, but as I understand host_deskto
| |
| 103 // platform specific NativeBrowserFrame by extending interface definition. | |
| 104 params.opacity = views::Widget::InitParams::TRANSLUCENT_WINDOW; | |
| 105 #endif | |
| 99 } | 106 } |
| 100 #endif | 107 #endif |
| 101 | 108 |
| 102 #if defined(OS_LINUX) && !defined(OS_CHROMEOS) | 109 #if defined(OS_LINUX) && !defined(OS_CHROMEOS) |
| 103 // Set up a custom WM_CLASS for some sorts of window types. This allows | 110 // Set up a custom WM_CLASS for some sorts of window types. This allows |
| 104 // task switchers in X11 environments to distinguish between main browser | 111 // task switchers in X11 environments to distinguish between main browser |
| 105 // windows and e.g app windows. | 112 // windows and e.g app windows. |
| 106 const CommandLine& command_line = *CommandLine::ForCurrentProcess(); | 113 const CommandLine& command_line = *CommandLine::ForCurrentProcess(); |
| 107 const Browser& browser = *browser_view_->browser(); | 114 const Browser& browser = *browser_view_->browser(); |
| 108 params.wm_class_class = ShellIntegrationLinux::GetProgramClassName(); | 115 params.wm_class_class = ShellIntegrationLinux::GetProgramClassName(); |
| (...skipping 154 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 263 | 270 |
| 264 NewAvatarButton* BrowserFrame::GetNewAvatarMenuButton() { | 271 NewAvatarButton* BrowserFrame::GetNewAvatarMenuButton() { |
| 265 return browser_frame_view_->new_avatar_button(); | 272 return browser_frame_view_->new_avatar_button(); |
| 266 } | 273 } |
| 267 | 274 |
| 268 #if !defined(OS_WIN) || defined(USE_AURA) | 275 #if !defined(OS_WIN) || defined(USE_AURA) |
| 269 bool BrowserFrame::ShouldLeaveOffsetNearTopBorder() { | 276 bool BrowserFrame::ShouldLeaveOffsetNearTopBorder() { |
| 270 return !IsMaximized(); | 277 return !IsMaximized(); |
| 271 } | 278 } |
| 272 #endif // OS_WIN | 279 #endif // OS_WIN |
| OLD | NEW |