| 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 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 43 : controller_(controller) {} | 43 : controller_(controller) {} |
| 44 | 44 |
| 45 void Observe(content::WebContents* new_web_contents) { | 45 void Observe(content::WebContents* new_web_contents) { |
| 46 WebContentsObserver::Observe(new_web_contents); | 46 WebContentsObserver::Observe(new_web_contents); |
| 47 } | 47 } |
| 48 | 48 |
| 49 WebContents* web_contents() const { | 49 WebContents* web_contents() const { |
| 50 return WebContentsObserver::web_contents(); | 50 return WebContentsObserver::web_contents(); |
| 51 } | 51 } |
| 52 | 52 |
| 53 void DidShowFullscreenWidget(int routing_id) override { | 53 void DidShowFullscreenWidget() override { |
| 54 [controller_ toggleFullscreenWidget:YES]; | 54 [controller_ toggleFullscreenWidget:YES]; |
| 55 } | 55 } |
| 56 | 56 |
| 57 void DidDestroyFullscreenWidget(int routing_id) override { | 57 void DidDestroyFullscreenWidget() override { |
| 58 [controller_ toggleFullscreenWidget:NO]; | 58 [controller_ toggleFullscreenWidget:NO]; |
| 59 } | 59 } |
| 60 | 60 |
| 61 void DidToggleFullscreenModeForTab(bool entered_fullscreen, | 61 void DidToggleFullscreenModeForTab(bool entered_fullscreen, |
| 62 bool will_cause_resize) override { | 62 bool will_cause_resize) override { |
| 63 [controller_ toggleFullscreenWidget:YES]; | 63 [controller_ toggleFullscreenWidget:YES]; |
| 64 } | 64 } |
| 65 | 65 |
| 66 private: | 66 private: |
| 67 TabContentsController* const controller_; | 67 TabContentsController* const controller_; |
| (...skipping 313 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 381 } | 381 } |
| 382 | 382 |
| 383 return NSRectFromCGRect(rect.ToCGRect()); | 383 return NSRectFromCGRect(rect.ToCGRect()); |
| 384 } | 384 } |
| 385 | 385 |
| 386 - (BOOL)shouldResizeContentView { | 386 - (BOOL)shouldResizeContentView { |
| 387 return !isEmbeddingFullscreenWidget_ || !blockFullscreenResize_; | 387 return !isEmbeddingFullscreenWidget_ || !blockFullscreenResize_; |
| 388 } | 388 } |
| 389 | 389 |
| 390 @end | 390 @end |
| OLD | NEW |