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 259 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
270 | 270 |
271 debugging_log_ << " InvokeEvent(" << std::left | 271 debugging_log_ << " InvokeEvent(" << std::left |
272 << std::setw(MAX_EVENT_NAME_LENGTH) << GetEventString(event) | 272 << std::setw(MAX_EVENT_NAME_LENGTH) << GetEventString(event) |
273 << ") to " | 273 << ") to " |
274 << std::setw(MAX_STATE_NAME_LENGTH) << GetStateString(next_state); | 274 << std::setw(MAX_STATE_NAME_LENGTH) << GetStateString(next_state); |
275 | 275 |
276 state_ = next_state; | 276 state_ = next_state; |
277 | 277 |
278 switch (event) { | 278 switch (event) { |
279 case TOGGLE_FULLSCREEN: | 279 case TOGGLE_FULLSCREEN: |
280 #if defined(OS_MACOSX) | |
281 GetFullscreenController()->TogglePresentationMode(); | |
282 #else | |
283 GetFullscreenController()->ToggleFullscreenMode(); | 280 GetFullscreenController()->ToggleFullscreenMode(); |
284 #endif | |
285 break; | 281 break; |
286 case TAB_FULLSCREEN_TRUE: | 282 case TAB_FULLSCREEN_TRUE: |
287 GetFullscreenController()->ToggleFullscreenModeForTab( | 283 GetFullscreenController()->ToggleFullscreenModeForTab( |
288 GetBrowser()->tab_strip_model()->GetActiveWebContents(), true); | 284 GetBrowser()->tab_strip_model()->GetActiveWebContents(), true); |
289 break; | 285 break; |
290 case TAB_FULLSCREEN_FALSE: | 286 case TAB_FULLSCREEN_FALSE: |
291 GetFullscreenController()->ToggleFullscreenModeForTab( | 287 GetFullscreenController()->ToggleFullscreenModeForTab( |
292 GetBrowser()->tab_strip_model()->GetActiveWebContents(), false); | 288 GetBrowser()->tab_strip_model()->GetActiveWebContents(), false); |
293 break; | 289 break; |
294 case METRO_SNAP_TRUE: | 290 case METRO_SNAP_TRUE: |
(...skipping 334 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
629 << GetAndClearDebugLog(); | 625 << GetAndClearDebugLog(); |
630 | 626 |
631 debugging_log_ << " Then,\n"; | 627 debugging_log_ << " Then,\n"; |
632 ASSERT_TRUE(InvokeEvent(event)) << GetAndClearDebugLog(); | 628 ASSERT_TRUE(InvokeEvent(event)) << GetAndClearDebugLog(); |
633 } | 629 } |
634 | 630 |
635 FullscreenController* FullscreenControllerStateTest::GetFullscreenController() { | 631 FullscreenController* FullscreenControllerStateTest::GetFullscreenController() { |
636 return GetBrowser()->fullscreen_controller(); | 632 return GetBrowser()->fullscreen_controller(); |
637 } | 633 } |
638 | 634 |
OLD | NEW |