OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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_aura.h" | 5 #include "chrome/browser/ui/views/frame/browser_frame_aura.h" |
6 | 6 |
7 #include "base/command_line.h" | 7 #include "base/command_line.h" |
8 #include "chrome/browser/themes/theme_service.h" | 8 #include "chrome/browser/themes/theme_service.h" |
9 #include "chrome/browser/ui/views/frame/browser_non_client_frame_view_aura.h" | 9 #include "chrome/browser/ui/views/frame/browser_non_client_frame_view_aura.h" |
10 #include "chrome/browser/ui/views/frame/browser_view.h" | 10 #include "chrome/browser/ui/views/frame/browser_view.h" |
(...skipping 147 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
158 } // namespace | 158 } // namespace |
159 | 159 |
160 /////////////////////////////////////////////////////////////////////////////// | 160 /////////////////////////////////////////////////////////////////////////////// |
161 // BrowserFrameAura, public: | 161 // BrowserFrameAura, public: |
162 | 162 |
163 BrowserFrameAura::BrowserFrameAura(BrowserFrame* browser_frame, | 163 BrowserFrameAura::BrowserFrameAura(BrowserFrame* browser_frame, |
164 BrowserView* browser_view) | 164 BrowserView* browser_view) |
165 : views::NativeWidgetAura(browser_frame), | 165 : views::NativeWidgetAura(browser_frame), |
166 browser_view_(browser_view), | 166 browser_view_(browser_view), |
167 browser_frame_(browser_frame) { | 167 browser_frame_(browser_frame) { |
168 if (CommandLine::ForCurrentProcess()->HasSwitch(switches::kAuraWindows)) { | 168 CommandLine* command_line = CommandLine::ForCurrentProcess(); |
| 169 if (command_line->HasSwitch(switches::kAuraTranslucentFrames)) { |
169 // Aura paints layers behind this view, so this must be a layer also. | 170 // Aura paints layers behind this view, so this must be a layer also. |
170 // TODO: see if we can avoid this, layers are expensive. | 171 // TODO: see if we can avoid this, layers are expensive. |
171 browser_view_->SetPaintToLayer(true); | 172 browser_view_->SetPaintToLayer(true); |
172 browser_view_->layer()->SetFillsBoundsOpaquely(false); | 173 browser_view_->layer()->SetFillsBoundsOpaquely(false); |
173 // Background only needed for Aura-style windows. | 174 // Background only needed for Aura-style windows. |
174 browser_view_->set_background(new ToolbarBackground(browser_view)); | 175 browser_view_->set_background(new ToolbarBackground(browser_view)); |
175 } else { | 176 } else { |
176 GetNativeWindow()->SetIntProperty(aura::kShadowTypeKey, | 177 GetNativeWindow()->SetIntProperty(aura::kShadowTypeKey, |
177 aura::SHADOW_TYPE_RECTANGULAR); | 178 aura::SHADOW_TYPE_RECTANGULAR); |
178 } | 179 } |
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
213 | 214 |
214 //////////////////////////////////////////////////////////////////////////////// | 215 //////////////////////////////////////////////////////////////////////////////// |
215 // NativeBrowserFrame, public: | 216 // NativeBrowserFrame, public: |
216 | 217 |
217 // static | 218 // static |
218 NativeBrowserFrame* NativeBrowserFrame::CreateNativeBrowserFrame( | 219 NativeBrowserFrame* NativeBrowserFrame::CreateNativeBrowserFrame( |
219 BrowserFrame* browser_frame, | 220 BrowserFrame* browser_frame, |
220 BrowserView* browser_view) { | 221 BrowserView* browser_view) { |
221 return new BrowserFrameAura(browser_frame, browser_view); | 222 return new BrowserFrameAura(browser_frame, browser_view); |
222 } | 223 } |
OLD | NEW |