OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 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/immersive_mode_controller.h" | 5 #include "chrome/browser/ui/views/immersive_mode_controller.h" |
6 | 6 |
7 #include "chrome/browser/ui/views/frame/browser_view.h" | 7 #include "chrome/browser/ui/views/frame/browser_view.h" |
8 #include "chrome/browser/ui/views/tabs/tab.h" | 8 #include "chrome/browser/ui/views/tabs/tab.h" |
9 #include "chrome/browser/ui/views/tabs/tab_strip.h" | 9 #include "chrome/browser/ui/views/tabs/tab_strip.h" |
10 #include "chrome/test/base/in_process_browser_test.h" | 10 #include "chrome/test/base/in_process_browser_test.h" |
11 #include "ui/compositor/layer_animator.h" | 11 #include "ui/compositor/layer_animator.h" |
12 #include "ui/gfx/rect.h" | 12 #include "ui/gfx/rect.h" |
13 #include "ui/views/view.h" | 13 #include "ui/views/view.h" |
14 | 14 |
15 #if defined(USE_ASH) | 15 #if defined(USE_ASH) |
16 #include "ash/root_window_controller.h" | 16 #include "ash/root_window_controller.h" |
17 #include "ash/shelf_types.h" | 17 #include "ash/shelf/shelf_layout_manager.h" |
| 18 #include "ash/shelf/shelf_types.h" |
18 #include "ash/shell.h" | 19 #include "ash/shell.h" |
19 #include "ash/wm/shelf_layout_manager.h" | |
20 #include "ash/wm/window_properties.h" | 20 #include "ash/wm/window_properties.h" |
21 #endif | 21 #endif |
22 | 22 |
23 namespace { | 23 namespace { |
24 | 24 |
25 // Returns the bounds of |view| in widget coordinates. | 25 // Returns the bounds of |view| in widget coordinates. |
26 gfx::Rect GetRectInWidget(views::View* view) { | 26 gfx::Rect GetRectInWidget(views::View* view) { |
27 return view->ConvertRectToWidget(view->GetLocalBounds()); | 27 return view->ConvertRectToWidget(view->GetLocalBounds()); |
28 } | 28 } |
29 | 29 |
(...skipping 194 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
224 | 224 |
225 // Setting the window property directly toggles immersive mode. | 225 // Setting the window property directly toggles immersive mode. |
226 aura::Window* window = browser_view->GetWidget()->GetNativeWindow(); | 226 aura::Window* window = browser_view->GetWidget()->GetNativeWindow(); |
227 window->SetProperty(ash::internal::kImmersiveModeKey, true); | 227 window->SetProperty(ash::internal::kImmersiveModeKey, true); |
228 EXPECT_TRUE(immersive_controller->enabled()); | 228 EXPECT_TRUE(immersive_controller->enabled()); |
229 window->SetProperty(ash::internal::kImmersiveModeKey, false); | 229 window->SetProperty(ash::internal::kImmersiveModeKey, false); |
230 EXPECT_FALSE(immersive_controller->enabled()); | 230 EXPECT_FALSE(immersive_controller->enabled()); |
231 } | 231 } |
232 | 232 |
233 #endif // defined(USE_ASH) | 233 #endif // defined(USE_ASH) |
OLD | NEW |