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/app/chrome_command_ids.h" | 7 #include "chrome/app/chrome_command_ids.h" |
8 #include "chrome/browser/ui/browser_commands.h" | 8 #include "chrome/browser/ui/browser_commands.h" |
9 #include "chrome/browser/ui/views/frame/browser_view.h" | 9 #include "chrome/browser/ui/views/frame/browser_view.h" |
10 #include "chrome/browser/ui/views/tabs/tab.h" | 10 #include "chrome/browser/ui/views/tabs/tab.h" |
11 #include "chrome/browser/ui/views/tabs/tab_strip.h" | 11 #include "chrome/browser/ui/views/tabs/tab_strip.h" |
12 #include "chrome/test/base/in_process_browser_test.h" | 12 #include "chrome/test/base/in_process_browser_test.h" |
13 #include "ui/compositor/layer_animator.h" | 13 #include "ui/compositor/layer_animator.h" |
14 #include "ui/gfx/rect.h" | 14 #include "ui/gfx/rect.h" |
15 #include "ui/views/view.h" | 15 #include "ui/views/view.h" |
16 | 16 |
17 #if defined(USE_ASH) | 17 #if defined(USE_ASH) |
18 #include "ash/root_window_controller.h" | 18 #include "ash/root_window_controller.h" |
19 #include "ash/shelf_types.h" | 19 #include "ash/shelf/shelf_layout_manager.h" |
| 20 #include "ash/shelf/shelf_types.h" |
20 #include "ash/shell.h" | 21 #include "ash/shell.h" |
21 #include "ash/wm/shelf_layout_manager.h" | |
22 #include "ash/wm/window_properties.h" | 22 #include "ash/wm/window_properties.h" |
23 #endif | 23 #endif |
24 | 24 |
25 namespace { | 25 namespace { |
26 | 26 |
27 // Returns the bounds of |view| in widget coordinates. | 27 // Returns the bounds of |view| in widget coordinates. |
28 gfx::Rect GetRectInWidget(views::View* view) { | 28 gfx::Rect GetRectInWidget(views::View* view) { |
29 return view->ConvertRectToWidget(view->GetLocalBounds()); | 29 return view->ConvertRectToWidget(view->GetLocalBounds()); |
30 } | 30 } |
31 | 31 |
(...skipping 228 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
260 // Setting the window property directly toggles immersive mode. | 260 // Setting the window property directly toggles immersive mode. |
261 // TODO(jamescook): Is this functionality still needed? | 261 // TODO(jamescook): Is this functionality still needed? |
262 aura::Window* window = browser_view->GetWidget()->GetNativeWindow(); | 262 aura::Window* window = browser_view->GetWidget()->GetNativeWindow(); |
263 window->SetProperty(ash::internal::kImmersiveModeKey, true); | 263 window->SetProperty(ash::internal::kImmersiveModeKey, true); |
264 EXPECT_TRUE(immersive_controller->enabled()); | 264 EXPECT_TRUE(immersive_controller->enabled()); |
265 window->SetProperty(ash::internal::kImmersiveModeKey, false); | 265 window->SetProperty(ash::internal::kImmersiveModeKey, false); |
266 EXPECT_FALSE(immersive_controller->enabled()); | 266 EXPECT_FALSE(immersive_controller->enabled()); |
267 } | 267 } |
268 | 268 |
269 #endif // defined(USE_ASH) | 269 #endif // defined(USE_ASH) |
OLD | NEW |