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 113 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
124 #include "ui/views/controls/webview/webview.h" | 124 #include "ui/views/controls/webview/webview.h" |
125 #include "ui/views/focus/external_focus_tracker.h" | 125 #include "ui/views/focus/external_focus_tracker.h" |
126 #include "ui/views/focus/view_storage.h" | 126 #include "ui/views/focus/view_storage.h" |
127 #include "ui/views/layout/grid_layout.h" | 127 #include "ui/views/layout/grid_layout.h" |
128 #include "ui/views/widget/native_widget.h" | 128 #include "ui/views/widget/native_widget.h" |
129 #include "ui/views/widget/root_view.h" | 129 #include "ui/views/widget/root_view.h" |
130 #include "ui/views/widget/widget.h" | 130 #include "ui/views/widget/widget.h" |
131 #include "ui/views/window/dialog_delegate.h" | 131 #include "ui/views/window/dialog_delegate.h" |
132 | 132 |
133 #if defined(USE_ASH) | 133 #if defined(USE_ASH) |
| 134 #include "ash/ash_switches.h" |
134 #include "ash/launcher/launcher.h" | 135 #include "ash/launcher/launcher.h" |
135 #include "ash/shelf/shelf_model.h" | 136 #include "ash/shelf/shelf_model.h" |
136 #include "ash/shell.h" | 137 #include "ash/shell.h" |
137 #include "chrome/browser/ui/ash/ash_util.h" | 138 #include "chrome/browser/ui/ash/ash_util.h" |
138 #endif | 139 #endif |
139 | 140 |
140 #if defined(USE_AURA) | 141 #if defined(USE_AURA) |
141 #include "ui/aura/window.h" | 142 #include "ui/aura/window.h" |
142 #include "ui/gfx/screen.h" | 143 #include "ui/gfx/screen.h" |
143 #elif defined(OS_WIN) // !defined(USE_AURA) | 144 #elif defined(OS_WIN) // !defined(USE_AURA) |
(...skipping 2174 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2318 in_process_fullscreen_ = false; | 2319 in_process_fullscreen_ = false; |
2319 ToolbarSizeChanged(false); | 2320 ToolbarSizeChanged(false); |
2320 } | 2321 } |
2321 | 2322 |
2322 bool BrowserView::ShouldUseImmersiveFullscreenForUrl(const GURL& url) const { | 2323 bool BrowserView::ShouldUseImmersiveFullscreenForUrl(const GURL& url) const { |
2323 #if defined(OS_CHROMEOS) | 2324 #if defined(OS_CHROMEOS) |
2324 // Kiosk mode needs the whole screen. | 2325 // Kiosk mode needs the whole screen. |
2325 if (CommandLine::ForCurrentProcess()->HasSwitch(switches::kKioskMode)) | 2326 if (CommandLine::ForCurrentProcess()->HasSwitch(switches::kKioskMode)) |
2326 return false; | 2327 return false; |
2327 bool is_browser_fullscreen = url.is_empty(); | 2328 bool is_browser_fullscreen = url.is_empty(); |
2328 return is_browser_fullscreen && IsBrowserTypeNormal(); | 2329 if (CommandLine::ForCurrentProcess()->HasSwitch( |
| 2330 ash::switches::kAshEnableImmersiveFullscreenForAllWindows)) { |
| 2331 return is_browser_fullscreen; |
| 2332 } else { |
| 2333 return is_browser_fullscreen && IsBrowserTypeNormal(); |
| 2334 } |
2329 #else | 2335 #else |
2330 return false; | 2336 return false; |
2331 #endif | 2337 #endif |
2332 } | 2338 } |
2333 | 2339 |
2334 void BrowserView::LoadAccelerators() { | 2340 void BrowserView::LoadAccelerators() { |
2335 #if defined(OS_WIN) && !defined(USE_AURA) | 2341 #if defined(OS_WIN) && !defined(USE_AURA) |
2336 HACCEL accelerator_table = AtlLoadAccelerators(IDR_MAINFRAME); | 2342 HACCEL accelerator_table = AtlLoadAccelerators(IDR_MAINFRAME); |
2337 DCHECK(accelerator_table); | 2343 DCHECK(accelerator_table); |
2338 | 2344 |
(...skipping 325 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2664 !GetLocationBar()->GetOmniboxView()->model()->popup_model()->IsOpen()) { | 2670 !GetLocationBar()->GetOmniboxView()->model()->popup_model()->IsOpen()) { |
2665 gfx::Point icon_bottom( | 2671 gfx::Point icon_bottom( |
2666 toolbar_->location_bar()->GetLocationBarAnchorPoint()); | 2672 toolbar_->location_bar()->GetLocationBarAnchorPoint()); |
2667 ConvertPointToTarget(toolbar_->location_bar(), this, &icon_bottom); | 2673 ConvertPointToTarget(toolbar_->location_bar(), this, &icon_bottom); |
2668 gfx::Point infobar_top(0, infobar_container_->GetVerticalOverlap(NULL)); | 2674 gfx::Point infobar_top(0, infobar_container_->GetVerticalOverlap(NULL)); |
2669 ConvertPointToTarget(infobar_container_, this, &infobar_top); | 2675 ConvertPointToTarget(infobar_container_, this, &infobar_top); |
2670 top_arrow_height = infobar_top.y() - icon_bottom.y(); | 2676 top_arrow_height = infobar_top.y() - icon_bottom.y(); |
2671 } | 2677 } |
2672 return top_arrow_height; | 2678 return top_arrow_height; |
2673 } | 2679 } |
OLD | NEW |