| 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 <stdint.h> | 7 #include <stdint.h> |
| 8 | 8 |
| 9 #include <utility> | 9 #include <utility> |
| 10 | 10 |
| (...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 51 } | 51 } |
| 52 | 52 |
| 53 void DidShowFullscreenWidget(int routing_id) override { | 53 void DidShowFullscreenWidget(int routing_id) override { |
| 54 [controller_ toggleFullscreenWidget:YES]; | 54 [controller_ toggleFullscreenWidget:YES]; |
| 55 } | 55 } |
| 56 | 56 |
| 57 void DidDestroyFullscreenWidget(int routing_id) override { | 57 void DidDestroyFullscreenWidget(int routing_id) override { |
| 58 [controller_ toggleFullscreenWidget:NO]; | 58 [controller_ toggleFullscreenWidget:NO]; |
| 59 } | 59 } |
| 60 | 60 |
| 61 void DidToggleFullscreenModeForTab(bool entered_fullscreen) override { | 61 void DidToggleFullscreenModeForTab(bool entered_fullscreen, |
| 62 bool will_cause_resize) override { |
| 62 [controller_ toggleFullscreenWidget:YES]; | 63 [controller_ toggleFullscreenWidget:YES]; |
| 63 } | 64 } |
| 64 | 65 |
| 65 private: | 66 private: |
| 66 TabContentsController* const controller_; | 67 TabContentsController* const controller_; |
| 67 | 68 |
| 68 DISALLOW_COPY_AND_ASSIGN(FullscreenObserver); | 69 DISALLOW_COPY_AND_ASSIGN(FullscreenObserver); |
| 69 }; | 70 }; |
| 70 | 71 |
| 71 @interface TabContentsController (TabContentsContainerViewDelegate) | 72 @interface TabContentsController (TabContentsContainerViewDelegate) |
| (...skipping 277 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 349 } else { | 350 } else { |
| 350 rect.ClampToCenteredSize(gfx::Size( | 351 rect.ClampToCenteredSize(gfx::Size( |
| 351 static_cast<int>(x / captureSize.height()), rect.height())); | 352 static_cast<int>(x / captureSize.height()), rect.height())); |
| 352 } | 353 } |
| 353 } | 354 } |
| 354 | 355 |
| 355 return NSRectFromCGRect(rect.ToCGRect()); | 356 return NSRectFromCGRect(rect.ToCGRect()); |
| 356 } | 357 } |
| 357 | 358 |
| 358 @end | 359 @end |
| OLD | NEW |