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 "ash/ash_switches.h" | 7 #include "ash/ash_switches.h" |
8 #include "base/command_line.h" | 8 #include "base/command_line.h" |
9 #include "chrome/browser/themes/theme_service.h" | 9 #include "chrome/browser/themes/theme_service.h" |
10 #include "chrome/browser/ui/views/frame/browser_non_client_frame_view_aura.h" | 10 #include "chrome/browser/ui/views/frame/browser_non_client_frame_view_aura.h" |
(...skipping 147 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
158 | 158 |
159 /////////////////////////////////////////////////////////////////////////////// | 159 /////////////////////////////////////////////////////////////////////////////// |
160 // BrowserFrameAura, public: | 160 // BrowserFrameAura, public: |
161 | 161 |
162 BrowserFrameAura::BrowserFrameAura(BrowserFrame* browser_frame, | 162 BrowserFrameAura::BrowserFrameAura(BrowserFrame* browser_frame, |
163 BrowserView* browser_view) | 163 BrowserView* browser_view) |
164 : views::NativeWidgetAura(browser_frame), | 164 : views::NativeWidgetAura(browser_frame), |
165 browser_view_(browser_view), | 165 browser_view_(browser_view), |
166 browser_frame_(browser_frame) { | 166 browser_frame_(browser_frame) { |
167 CommandLine* command_line = CommandLine::ForCurrentProcess(); | 167 CommandLine* command_line = CommandLine::ForCurrentProcess(); |
168 if (command_line->HasSwitch(aura_shell::switches::kAuraTranslucentFrames)) { | 168 if (command_line->HasSwitch(ash::switches::kAuraTranslucentFrames)) { |
169 // Aura paints layers behind this view, so this must be a layer also. | 169 // Aura paints layers behind this view, so this must be a layer also. |
170 // TODO: see if we can avoid this, layers are expensive. | 170 // TODO: see if we can avoid this, layers are expensive. |
171 browser_view_->SetPaintToLayer(true); | 171 browser_view_->SetPaintToLayer(true); |
172 browser_view_->layer()->SetFillsBoundsOpaquely(false); | 172 browser_view_->layer()->SetFillsBoundsOpaquely(false); |
173 // Background only needed for Aura-style windows. | 173 // Background only needed for Aura-style windows. |
174 browser_view_->set_background(new ToolbarBackground(browser_view)); | 174 browser_view_->set_background(new ToolbarBackground(browser_view)); |
175 } | 175 } |
176 GetNativeWindow()->AddObserver(this); | 176 GetNativeWindow()->AddObserver(this); |
177 } | 177 } |
178 | 178 |
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
237 | 237 |
238 //////////////////////////////////////////////////////////////////////////////// | 238 //////////////////////////////////////////////////////////////////////////////// |
239 // NativeBrowserFrame, public: | 239 // NativeBrowserFrame, public: |
240 | 240 |
241 // static | 241 // static |
242 NativeBrowserFrame* NativeBrowserFrame::CreateNativeBrowserFrame( | 242 NativeBrowserFrame* NativeBrowserFrame::CreateNativeBrowserFrame( |
243 BrowserFrame* browser_frame, | 243 BrowserFrame* browser_frame, |
244 BrowserView* browser_view) { | 244 BrowserView* browser_view) { |
245 return new BrowserFrameAura(browser_frame, browser_view); | 245 return new BrowserFrameAura(browser_frame, browser_view); |
246 } | 246 } |
OLD | NEW |