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

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

Issue 108193005: Fixing opacity for browser frame window on ASH/Windows. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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/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
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 &params.bounds, 92 &params.bounds,
93 &params.show_state); 93 &params.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.
scottmg 2013/12/06 20:52:00 nit; "If this window is under ASH on Windows. We n
Shrikant Kelkar 2013/12/06 21:46:50 Done.
102 // TODO(shrikant): Instead of #if, this logic can possibly be moved to
103 // platform specific NativeBrowserFrame by extending interface definition.
104 params.opacity = views::Widget::InitParams::TRANSLUCENT_WINDOW;
scottmg 2013/12/06 20:52:00 It should ask ChromeViewsDelegate::UseTransparentW
Shrikant Kelkar 2013/12/06 21:46:50 It doesn't do the right thing as of now for ASH wi
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
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
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698