| 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 #import "chrome/browser/ui/cocoa/tab_contents/tab_contents_controller.h" | 5 #import "chrome/browser/ui/cocoa/tab_contents/tab_contents_controller.h" |
| 6 | 6 |
| 7 #include <utility> | 7 #include <utility> |
| 8 | 8 |
| 9 #include "base/mac/scoped_cftyperef.h" | 9 #include "base/mac/scoped_cftyperef.h" |
| 10 #include "base/mac/scoped_nsobject.h" | 10 #include "base/mac/scoped_nsobject.h" |
| (...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 48 } | 48 } |
| 49 | 49 |
| 50 void DidShowFullscreenWidget(int routing_id) override { | 50 void DidShowFullscreenWidget(int routing_id) override { |
| 51 [controller_ toggleFullscreenWidget:YES]; | 51 [controller_ toggleFullscreenWidget:YES]; |
| 52 } | 52 } |
| 53 | 53 |
| 54 void DidDestroyFullscreenWidget(int routing_id) override { | 54 void DidDestroyFullscreenWidget(int routing_id) override { |
| 55 [controller_ toggleFullscreenWidget:NO]; | 55 [controller_ toggleFullscreenWidget:NO]; |
| 56 } | 56 } |
| 57 | 57 |
| 58 void DidToggleFullscreenModeForTab(bool entered_fullscreen) override { | 58 void DidToggleFullscreenModeForTab(bool entered_fullscreen, |
| 59 bool will_cause_resize) override { |
| 59 [controller_ toggleFullscreenWidget:YES]; | 60 [controller_ toggleFullscreenWidget:YES]; |
| 60 } | 61 } |
| 61 | 62 |
| 62 private: | 63 private: |
| 63 TabContentsController* const controller_; | 64 TabContentsController* const controller_; |
| 64 | 65 |
| 65 DISALLOW_COPY_AND_ASSIGN(FullscreenObserver); | 66 DISALLOW_COPY_AND_ASSIGN(FullscreenObserver); |
| 66 }; | 67 }; |
| 67 | 68 |
| 68 @interface TabContentsController (TabContentsContainerViewDelegate) | 69 @interface TabContentsController (TabContentsContainerViewDelegate) |
| (...skipping 278 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 347 } else { | 348 } else { |
| 348 rect.ClampToCenteredSize(gfx::Size( | 349 rect.ClampToCenteredSize(gfx::Size( |
| 349 static_cast<int>(x / captureSize.height()), rect.height())); | 350 static_cast<int>(x / captureSize.height()), rect.height())); |
| 350 } | 351 } |
| 351 } | 352 } |
| 352 | 353 |
| 353 return NSRectFromCGRect(rect.ToCGRect()); | 354 return NSRectFromCGRect(rect.ToCGRect()); |
| 354 } | 355 } |
| 355 | 356 |
| 356 @end | 357 @end |
| OLD | NEW |