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

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

Issue 9618022: Ash: Use translucent frames by default (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: leak in CustomFrameViewAsh Created 8 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 "base/command_line.h"
8 #include "base/i18n/rtl.h" 7 #include "base/i18n/rtl.h"
9 #include "chrome/browser/themes/theme_service.h" 8 #include "chrome/browser/themes/theme_service.h"
10 #include "chrome/browser/themes/theme_service_factory.h" 9 #include "chrome/browser/themes/theme_service_factory.h"
11 #include "chrome/browser/ui/browser.h" 10 #include "chrome/browser/ui/browser.h"
12 #include "chrome/browser/ui/browser_list.h" 11 #include "chrome/browser/ui/browser_list.h"
13 #include "chrome/browser/ui/views/frame/browser_non_client_frame_view.h" 12 #include "chrome/browser/ui/views/frame/browser_non_client_frame_view.h"
14 #include "chrome/browser/ui/views/frame/browser_root_view.h" 13 #include "chrome/browser/ui/views/frame/browser_root_view.h"
15 #include "chrome/browser/ui/views/frame/browser_view.h" 14 #include "chrome/browser/ui/views/frame/browser_view.h"
16 #include "chrome/browser/ui/views/frame/native_browser_frame.h" 15 #include "chrome/browser/ui/views/frame/native_browser_frame.h"
17 #include "chrome/common/chrome_switches.h" 16 #include "chrome/common/chrome_switches.h"
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after
72 // Note: InitParams::TYPE_POPUP is currently used by transient windows 71 // Note: InitParams::TYPE_POPUP is currently used by transient windows
73 // which do not have a NonClientFrameView. Use TYPE_BUBBLE instead. 72 // which do not have a NonClientFrameView. Use TYPE_BUBBLE instead.
74 params.type = views::Widget::InitParams::TYPE_BUBBLE; 73 params.type = views::Widget::InitParams::TYPE_BUBBLE;
75 // In compact mode there is no launcher, so we need to keep panels always 74 // In compact mode there is no launcher, so we need to keep panels always
76 // on top so they do not get lost. 75 // on top so they do not get lost.
77 if (ash::Shell::GetInstance()->IsWindowModeCompact()) 76 if (ash::Shell::GetInstance()->IsWindowModeCompact())
78 params.keep_on_top = true; 77 params.keep_on_top = true;
79 #endif 78 #endif
80 } 79 }
81 #if defined(USE_AURA) 80 #if defined(USE_AURA)
82 CommandLine* command_line = CommandLine::ForCurrentProcess(); 81 // Compact mode has opaque frames, otherwise Aura frames are translucent.
83 if (command_line->HasSwitch(ash::switches::kAuraTranslucentFrames)) 82 if (!ash::Shell::GetInstance()->IsWindowModeCompact())
84 params.transparent = true; 83 params.transparent = true;
85 // Aura compact mode fills the monitor with with its windows. 84 // Aura compact mode fills the monitor with with its windows.
86 if (ash::Shell::GetInstance()->IsWindowModeCompact() && 85 if (ash::Shell::GetInstance()->IsWindowModeCompact() &&
87 browser_view_->IsBrowserTypeNormal()) { 86 browser_view_->IsBrowserTypeNormal()) {
88 params.bounds = gfx::Screen::GetPrimaryMonitorBounds(); 87 params.bounds = gfx::Screen::GetPrimaryMonitorBounds();
89 params.show_state = ui::SHOW_STATE_MAXIMIZED; 88 params.show_state = ui::SHOW_STATE_MAXIMIZED;
90 } 89 }
91 #endif 90 #endif
92 Init(params); 91 Init(params);
93 92
(...skipping 131 matching lines...) Expand 10 before | Expand all | Expand 10 after
225 // set ourselves as the last active browser window to ensure that we get 224 // set ourselves as the last active browser window to ensure that we get
226 // treated as such by the rest of Chrome. 225 // treated as such by the rest of Chrome.
227 BrowserList::SetLastActive(browser_view_->browser()); 226 BrowserList::SetLastActive(browser_view_->browser());
228 } 227 }
229 Widget::OnNativeWidgetActivationChanged(active); 228 Widget::OnNativeWidgetActivationChanged(active);
230 } 229 }
231 230
232 AvatarMenuButton* BrowserFrame::GetAvatarMenuButton() { 231 AvatarMenuButton* BrowserFrame::GetAvatarMenuButton() {
233 return browser_frame_view_->avatar_button(); 232 return browser_frame_view_->avatar_button();
234 } 233 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698