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 |
280 GetFullscreenController()->ToggleFullscreenMode(); | 283 GetFullscreenController()->ToggleFullscreenMode(); |
| 284 #endif |
281 break; | 285 break; |
282 case TAB_FULLSCREEN_TRUE: | 286 case TAB_FULLSCREEN_TRUE: |
283 GetFullscreenController()->ToggleFullscreenModeForTab( | 287 GetFullscreenController()->ToggleFullscreenModeForTab( |
284 GetBrowser()->tab_strip_model()->GetActiveWebContents(), true); | 288 GetBrowser()->tab_strip_model()->GetActiveWebContents(), true); |
285 break; | 289 break; |
286 case TAB_FULLSCREEN_FALSE: | 290 case TAB_FULLSCREEN_FALSE: |
287 GetFullscreenController()->ToggleFullscreenModeForTab( | 291 GetFullscreenController()->ToggleFullscreenModeForTab( |
288 GetBrowser()->tab_strip_model()->GetActiveWebContents(), false); | 292 GetBrowser()->tab_strip_model()->GetActiveWebContents(), false); |
289 break; | 293 break; |
290 case METRO_SNAP_TRUE: | 294 case METRO_SNAP_TRUE: |
(...skipping 334 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
625 << GetAndClearDebugLog(); | 629 << GetAndClearDebugLog(); |
626 | 630 |
627 debugging_log_ << " Then,\n"; | 631 debugging_log_ << " Then,\n"; |
628 ASSERT_TRUE(InvokeEvent(event)) << GetAndClearDebugLog(); | 632 ASSERT_TRUE(InvokeEvent(event)) << GetAndClearDebugLog(); |
629 } | 633 } |
630 | 634 |
631 FullscreenController* FullscreenControllerStateTest::GetFullscreenController() { | 635 FullscreenController* FullscreenControllerStateTest::GetFullscreenController() { |
632 return GetBrowser()->fullscreen_controller(); | 636 return GetBrowser()->fullscreen_controller(); |
633 } | 637 } |
634 | 638 |
OLD | NEW |