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/fullscreen/fullscreen_controller_state_test.h" | 5 #include "chrome/browser/ui/fullscreen/fullscreen_controller_state_test.h" |
6 | 6 |
7 #include <memory.h> | 7 #include <memory.h> |
8 | 8 |
9 #include <iomanip> | 9 #include <iomanip> |
10 #include <iostream> | 10 #include <iostream> |
(...skipping 279 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
290 | 290 |
291 debugging_log_ << " InvokeEvent(" << std::left | 291 debugging_log_ << " InvokeEvent(" << std::left |
292 << std::setw(MAX_EVENT_NAME_LENGTH) << GetEventString(event) | 292 << std::setw(MAX_EVENT_NAME_LENGTH) << GetEventString(event) |
293 << ") to " | 293 << ") to " |
294 << std::setw(MAX_STATE_NAME_LENGTH) << GetStateString(next_state); | 294 << std::setw(MAX_STATE_NAME_LENGTH) << GetStateString(next_state); |
295 | 295 |
296 state_ = next_state; | 296 state_ = next_state; |
297 | 297 |
298 switch (event) { | 298 switch (event) { |
299 case TOGGLE_FULLSCREEN: | 299 case TOGGLE_FULLSCREEN: |
300 #if defined(OS_MACOSX) | |
301 GetFullscreenController()->TogglePresentationMode(); | |
302 #else | |
303 GetFullscreenController()->ToggleFullscreenMode(); | 300 GetFullscreenController()->ToggleFullscreenMode(); |
304 #endif | |
305 break; | 301 break; |
306 case TAB_FULLSCREEN_TRUE: | 302 case TAB_FULLSCREEN_TRUE: |
307 GetFullscreenController()->ToggleFullscreenModeForTab( | 303 GetFullscreenController()->ToggleFullscreenModeForTab( |
308 GetBrowser()->tab_strip_model()->GetActiveWebContents(), true); | 304 GetBrowser()->tab_strip_model()->GetActiveWebContents(), true); |
309 break; | 305 break; |
310 case TAB_FULLSCREEN_FALSE: | 306 case TAB_FULLSCREEN_FALSE: |
311 GetFullscreenController()->ToggleFullscreenModeForTab( | 307 GetFullscreenController()->ToggleFullscreenModeForTab( |
312 GetBrowser()->tab_strip_model()->GetActiveWebContents(), false); | 308 GetBrowser()->tab_strip_model()->GetActiveWebContents(), false); |
313 break; | 309 break; |
314 #if defined(OS_WIN) | 310 #if defined(OS_WIN) |
(...skipping 310 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
625 << GetAndClearDebugLog(); | 621 << GetAndClearDebugLog(); |
626 | 622 |
627 debugging_log_ << " Then,\n"; | 623 debugging_log_ << " Then,\n"; |
628 ASSERT_TRUE(InvokeEvent(event)) << GetAndClearDebugLog(); | 624 ASSERT_TRUE(InvokeEvent(event)) << GetAndClearDebugLog(); |
629 } | 625 } |
630 | 626 |
631 FullscreenController* FullscreenControllerStateTest::GetFullscreenController() { | 627 FullscreenController* FullscreenControllerStateTest::GetFullscreenController() { |
632 return GetBrowser()->fullscreen_controller(); | 628 return GetBrowser()->fullscreen_controller(); |
633 } | 629 } |
634 | 630 |
OLD | NEW |