| 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 25 matching lines...) Expand all Loading... |
| 36 : controller_(controller) {} | 36 : controller_(controller) {} |
| 37 | 37 |
| 38 void Observe(content::WebContents* new_web_contents) { | 38 void Observe(content::WebContents* new_web_contents) { |
| 39 WebContentsObserver::Observe(new_web_contents); | 39 WebContentsObserver::Observe(new_web_contents); |
| 40 } | 40 } |
| 41 | 41 |
| 42 WebContents* web_contents() const { | 42 WebContents* web_contents() const { |
| 43 return WebContentsObserver::web_contents(); | 43 return WebContentsObserver::web_contents(); |
| 44 } | 44 } |
| 45 | 45 |
| 46 virtual void DidShowFullscreenWidget(int routing_id) OVERRIDE { | 46 virtual void DidShowFullscreenWidget(int routing_id) override { |
| 47 [controller_ toggleFullscreenWidget:YES]; | 47 [controller_ toggleFullscreenWidget:YES]; |
| 48 } | 48 } |
| 49 | 49 |
| 50 virtual void DidDestroyFullscreenWidget(int routing_id) OVERRIDE { | 50 virtual void DidDestroyFullscreenWidget(int routing_id) override { |
| 51 [controller_ toggleFullscreenWidget:NO]; | 51 [controller_ toggleFullscreenWidget:NO]; |
| 52 } | 52 } |
| 53 | 53 |
| 54 virtual void DidToggleFullscreenModeForTab(bool entered_fullscreen) OVERRIDE { | 54 virtual void DidToggleFullscreenModeForTab(bool entered_fullscreen) override { |
| 55 [controller_ toggleFullscreenWidget:YES]; | 55 [controller_ toggleFullscreenWidget:YES]; |
| 56 } | 56 } |
| 57 | 57 |
| 58 private: | 58 private: |
| 59 TabContentsController* const controller_; | 59 TabContentsController* const controller_; |
| 60 | 60 |
| 61 DISALLOW_COPY_AND_ASSIGN(FullscreenObserver); | 61 DISALLOW_COPY_AND_ASSIGN(FullscreenObserver); |
| 62 }; | 62 }; |
| 63 | 63 |
| 64 @interface TabContentsController (TabContentsContainerViewDelegate) | 64 @interface TabContentsController (TabContentsContainerViewDelegate) |
| (...skipping 272 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 337 } else { | 337 } else { |
| 338 rect.ClampToCenteredSize(gfx::Size( | 338 rect.ClampToCenteredSize(gfx::Size( |
| 339 static_cast<int>(x / captureSize.height()), rect.height())); | 339 static_cast<int>(x / captureSize.height()), rect.height())); |
| 340 } | 340 } |
| 341 } | 341 } |
| 342 | 342 |
| 343 return NSRectFromCGRect(rect.ToCGRect()); | 343 return NSRectFromCGRect(rect.ToCGRect()); |
| 344 } | 344 } |
| 345 | 345 |
| 346 @end | 346 @end |
| OLD | NEW |