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

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

Issue 9033007: Rename the aura_shell namespace to ash (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 9 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
OLDNEW
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.h" 5 #include "chrome/browser/ui/views/frame/browser_frame.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/themes/theme_service_factory.h" 9 #include "chrome/browser/themes/theme_service_factory.h"
10 #include "chrome/browser/ui/browser.h" 10 #include "chrome/browser/ui/browser.h"
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
59 } 59 }
60 if (browser_view_->browser()->is_type_panel()) { 60 if (browser_view_->browser()->is_type_panel()) {
61 // We need to set the top-most bit when the panel window is created. 61 // We need to set the top-most bit when the panel window is created.
62 // There is a Windows bug/feature that would very likely prevent the window 62 // There is a Windows bug/feature that would very likely prevent the window
63 // from being changed to top-most after the window is created without 63 // from being changed to top-most after the window is created without
64 // activation. 64 // activation.
65 params.keep_on_top = true; 65 params.keep_on_top = true;
66 } 66 }
67 #if defined(USE_AURA) 67 #if defined(USE_AURA)
68 CommandLine* command_line = CommandLine::ForCurrentProcess(); 68 CommandLine* command_line = CommandLine::ForCurrentProcess();
69 if (command_line->HasSwitch(aura_shell::switches::kAuraTranslucentFrames)) 69 if (command_line->HasSwitch(ash::switches::kAuraTranslucentFrames))
70 params.transparent = true; 70 params.transparent = true;
71 // Aura laptop mode fills the monitor with with its windows. 71 // Aura laptop mode fills the monitor with with its windows.
72 if (aura_shell::switches::IsAuraWindowModeCompact() && 72 if (ash::switches::IsAuraWindowModeCompact() &&
73 browser_view_->IsBrowserTypeNormal()) { 73 browser_view_->IsBrowserTypeNormal()) {
74 params.bounds = gfx::Screen::GetPrimaryMonitorBounds(); 74 params.bounds = gfx::Screen::GetPrimaryMonitorBounds();
75 params.show_state = ui::SHOW_STATE_MAXIMIZED; 75 params.show_state = ui::SHOW_STATE_MAXIMIZED;
76 } 76 }
77 #endif 77 #endif
78 Init(params); 78 Init(params);
79 79
80 // On ChromeOS and Aura laptop mode we always want top-level windows 80 // On ChromeOS and Aura laptop mode we always want top-level windows
81 // to appear active. 81 // to appear active.
82 bool disable_inactive_rendering = false; 82 bool disable_inactive_rendering = false;
83 #if defined(USE_AURA) 83 #if defined(USE_AURA)
84 disable_inactive_rendering = aura_shell::switches::IsAuraWindowModeCompact(); 84 disable_inactive_rendering = ash::switches::IsAuraWindowModeCompact();
85 #elif defined(OS_CHROMEOS) 85 #elif defined(OS_CHROMEOS)
86 disable_inactive_rendering = true; 86 disable_inactive_rendering = true;
87 #endif 87 #endif
88 if (disable_inactive_rendering && !browser_view_->IsBrowserTypePopup()) 88 if (disable_inactive_rendering && !browser_view_->IsBrowserTypePopup())
89 DisableInactiveRendering(); 89 DisableInactiveRendering();
90 } 90 }
91 91
92 int BrowserFrame::GetMinimizeButtonOffset() const { 92 int BrowserFrame::GetMinimizeButtonOffset() const {
93 return native_browser_frame_->GetMinimizeButtonOffset(); 93 return native_browser_frame_->GetMinimizeButtonOffset();
94 } 94 }
(...skipping 19 matching lines...) Expand all
114 // Make sure the child of the root view gets Layout again. 114 // Make sure the child of the root view gets Layout again.
115 GetRootView()->child_at(0)->InvalidateLayout(); 115 GetRootView()->child_at(0)->InvalidateLayout();
116 } 116 }
117 GetRootView()->Layout(); 117 GetRootView()->Layout();
118 native_browser_frame_->TabStripDisplayModeChanged(); 118 native_browser_frame_->TabStripDisplayModeChanged();
119 } 119 }
120 120
121 bool BrowserFrame::IsSingleWindowMode() const { 121 bool BrowserFrame::IsSingleWindowMode() const {
122 bool single_window_mode = false; 122 bool single_window_mode = false;
123 #if defined(USE_AURA) 123 #if defined(USE_AURA)
124 single_window_mode = aura_shell::switches::IsAuraWindowModeCompact(); 124 single_window_mode = ash::switches::IsAuraWindowModeCompact();
125 #elif defined(OS_CHROMEOS) 125 #elif defined(OS_CHROMEOS)
126 single_window_mode = 126 single_window_mode =
127 chromeos::system::runtime_environment::IsRunningOnChromeOS(); 127 chromeos::system::runtime_environment::IsRunningOnChromeOS();
128 #endif 128 #endif
129 return single_window_mode; 129 return single_window_mode;
130 } 130 }
131 131
132 /////////////////////////////////////////////////////////////////////////////// 132 ///////////////////////////////////////////////////////////////////////////////
133 // BrowserFrame, views::Widget overrides: 133 // BrowserFrame, views::Widget overrides:
134 134
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
180 // set ourselves as the last active browser window to ensure that we get 180 // set ourselves as the last active browser window to ensure that we get
181 // treated as such by the rest of Chrome. 181 // treated as such by the rest of Chrome.
182 BrowserList::SetLastActive(browser_view_->browser()); 182 BrowserList::SetLastActive(browser_view_->browser());
183 } 183 }
184 Widget::OnNativeWidgetActivationChanged(active); 184 Widget::OnNativeWidgetActivationChanged(active);
185 } 185 }
186 186
187 AvatarMenuButton* BrowserFrame::GetAvatarMenuButton() { 187 AvatarMenuButton* BrowserFrame::GetAvatarMenuButton() {
188 return browser_frame_view_->avatar_button(); 188 return browser_frame_view_->avatar_button();
189 } 189 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698