OLD | NEW |
1 // Copyright 2012 The Chromium Authors. All rights reserved. | 1 // Copyright 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_view.h" | 5 #include "chrome/browser/ui/views/frame/browser_view.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 | 8 |
9 #include "base/auto_reset.h" | 9 #include "base/auto_reset.h" |
10 #include "base/command_line.h" | 10 #include "base/command_line.h" |
(...skipping 2248 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2259 in_process_fullscreen_ = false; | 2259 in_process_fullscreen_ = false; |
2260 ToolbarSizeChanged(false); | 2260 ToolbarSizeChanged(false); |
2261 } | 2261 } |
2262 | 2262 |
2263 bool BrowserView::ShouldUseImmersiveFullscreenForUrl(const GURL& url) const { | 2263 bool BrowserView::ShouldUseImmersiveFullscreenForUrl(const GURL& url) const { |
2264 #if defined(OS_CHROMEOS) | 2264 #if defined(OS_CHROMEOS) |
2265 // Kiosk mode needs the whole screen. | 2265 // Kiosk mode needs the whole screen. |
2266 if (CommandLine::ForCurrentProcess()->HasSwitch(switches::kKioskMode)) | 2266 if (CommandLine::ForCurrentProcess()->HasSwitch(switches::kKioskMode)) |
2267 return false; | 2267 return false; |
2268 bool is_browser_fullscreen = url.is_empty(); | 2268 bool is_browser_fullscreen = url.is_empty(); |
2269 if (CommandLine::ForCurrentProcess()->HasSwitch( | 2269 if (ash::switches::UseImmersiveFullscreenForAllWindows()) |
2270 ash::switches::kAshEnableImmersiveFullscreenForAllWindows)) { | |
2271 return is_browser_fullscreen; | 2270 return is_browser_fullscreen; |
2272 } else { | 2271 else |
2273 return is_browser_fullscreen && IsBrowserTypeNormal(); | 2272 return is_browser_fullscreen && IsBrowserTypeNormal(); |
2274 } | |
2275 #else | 2273 #else |
2276 return false; | 2274 return false; |
2277 #endif | 2275 #endif |
2278 } | 2276 } |
2279 | 2277 |
2280 void BrowserView::LoadAccelerators() { | 2278 void BrowserView::LoadAccelerators() { |
2281 #if defined(OS_WIN) && !defined(USE_AURA) | 2279 #if defined(OS_WIN) && !defined(USE_AURA) |
2282 HACCEL accelerator_table = AtlLoadAccelerators(IDR_MAINFRAME); | 2280 HACCEL accelerator_table = AtlLoadAccelerators(IDR_MAINFRAME); |
2283 DCHECK(accelerator_table); | 2281 DCHECK(accelerator_table); |
2284 | 2282 |
(...skipping 331 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2616 !GetLocationBar()->GetOmniboxView()->model()->popup_model()->IsOpen()) { | 2614 !GetLocationBar()->GetOmniboxView()->model()->popup_model()->IsOpen()) { |
2617 gfx::Point icon_bottom( | 2615 gfx::Point icon_bottom( |
2618 toolbar_->location_bar()->GetLocationBarAnchorPoint()); | 2616 toolbar_->location_bar()->GetLocationBarAnchorPoint()); |
2619 ConvertPointToTarget(toolbar_->location_bar(), this, &icon_bottom); | 2617 ConvertPointToTarget(toolbar_->location_bar(), this, &icon_bottom); |
2620 gfx::Point infobar_top(0, infobar_container_->GetVerticalOverlap(NULL)); | 2618 gfx::Point infobar_top(0, infobar_container_->GetVerticalOverlap(NULL)); |
2621 ConvertPointToTarget(infobar_container_, this, &infobar_top); | 2619 ConvertPointToTarget(infobar_container_, this, &infobar_top); |
2622 top_arrow_height = infobar_top.y() - icon_bottom.y(); | 2620 top_arrow_height = infobar_top.y() - icon_bottom.y(); |
2623 } | 2621 } |
2624 return top_arrow_height; | 2622 return top_arrow_height; |
2625 } | 2623 } |
OLD | NEW |