| 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/exclusive_access/fullscreen_controller_state_test.h" | 5 #include "chrome/browser/ui/exclusive_access/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 366 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 377 break; | 377 break; |
| 378 } | 378 } |
| 379 #endif | 379 #endif |
| 380 NOTREACHED() << GetAndClearDebugLog(); | 380 NOTREACHED() << GetAndClearDebugLog(); |
| 381 break; | 381 break; |
| 382 | 382 |
| 383 case TAB_FULLSCREEN_TRUE: | 383 case TAB_FULLSCREEN_TRUE: |
| 384 case TAB_FULLSCREEN_FALSE: { | 384 case TAB_FULLSCREEN_FALSE: { |
| 385 content::WebContents* const active_tab = | 385 content::WebContents* const active_tab = |
| 386 GetBrowser()->tab_strip_model()->GetActiveWebContents(); | 386 GetBrowser()->tab_strip_model()->GetActiveWebContents(); |
| 387 GetFullscreenController()-> | 387 if (event == TAB_FULLSCREEN_TRUE) { |
| 388 ToggleFullscreenModeForTab(active_tab, event == TAB_FULLSCREEN_TRUE); | 388 GetFullscreenController()->EnterFullscreenModeForTab(active_tab, |
| 389 GURL()); |
| 390 } else { |
| 391 GetFullscreenController()->ExitFullscreenModeForTab(active_tab); |
| 392 } |
| 393 |
| 389 // Activating/Deactivating tab fullscreen on a captured tab should not | 394 // Activating/Deactivating tab fullscreen on a captured tab should not |
| 390 // evoke a state change in the browser window. | 395 // evoke a state change in the browser window. |
| 391 if (active_tab->GetCapturerCount() > 0) | 396 if (active_tab->GetCapturerCount() > 0) |
| 392 state_ = source_state; | 397 state_ = source_state; |
| 393 break; | 398 break; |
| 394 } | 399 } |
| 395 | 400 |
| 396 case METRO_SNAP_TRUE: | 401 case METRO_SNAP_TRUE: |
| 397 #if defined(OS_WIN) | 402 #if defined(OS_WIN) |
| 398 GetFullscreenController()->SetMetroSnapMode(true); | 403 GetFullscreenController()->SetMetroSnapMode(true); |
| (...skipping 395 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 794 << std::right << std::setw(2) | 799 << std::right << std::setw(2) |
| 795 << info.distance | 800 << info.distance |
| 796 << " }, // " | 801 << " }, // " |
| 797 << GetStateString(state2) << "\n"; | 802 << GetStateString(state2) << "\n"; |
| 798 } | 803 } |
| 799 output << "},\n"; | 804 output << "},\n"; |
| 800 } | 805 } |
| 801 output << "};"; | 806 output << "};"; |
| 802 return output.str(); | 807 return output.str(); |
| 803 } | 808 } |
| OLD | NEW |