| 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 26 matching lines...) Expand all Loading... |
| 37 : controller_(controller) {} | 37 : controller_(controller) {} |
| 38 | 38 |
| 39 void Observe(content::WebContents* new_web_contents) { | 39 void Observe(content::WebContents* new_web_contents) { |
| 40 WebContentsObserver::Observe(new_web_contents); | 40 WebContentsObserver::Observe(new_web_contents); |
| 41 } | 41 } |
| 42 | 42 |
| 43 WebContents* web_contents() const { | 43 WebContents* web_contents() const { |
| 44 return WebContentsObserver::web_contents(); | 44 return WebContentsObserver::web_contents(); |
| 45 } | 45 } |
| 46 | 46 |
| 47 virtual void DidShowFullscreenWidget(int routing_id) override { | 47 void DidShowFullscreenWidget(int routing_id) override { |
| 48 [controller_ toggleFullscreenWidget:YES]; | 48 [controller_ toggleFullscreenWidget:YES]; |
| 49 } | 49 } |
| 50 | 50 |
| 51 virtual void DidDestroyFullscreenWidget(int routing_id) override { | 51 void DidDestroyFullscreenWidget(int routing_id) override { |
| 52 [controller_ toggleFullscreenWidget:NO]; | 52 [controller_ toggleFullscreenWidget:NO]; |
| 53 } | 53 } |
| 54 | 54 |
| 55 virtual void DidToggleFullscreenModeForTab(bool entered_fullscreen) override { | 55 void DidToggleFullscreenModeForTab(bool entered_fullscreen) override { |
| 56 [controller_ toggleFullscreenWidget:YES]; | 56 [controller_ toggleFullscreenWidget:YES]; |
| 57 } | 57 } |
| 58 | 58 |
| 59 private: | 59 private: |
| 60 TabContentsController* const controller_; | 60 TabContentsController* const controller_; |
| 61 | 61 |
| 62 DISALLOW_COPY_AND_ASSIGN(FullscreenObserver); | 62 DISALLOW_COPY_AND_ASSIGN(FullscreenObserver); |
| 63 }; | 63 }; |
| 64 | 64 |
| 65 @interface TabContentsController (TabContentsContainerViewDelegate) | 65 @interface TabContentsController (TabContentsContainerViewDelegate) |
| (...skipping 294 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 360 } else { | 360 } else { |
| 361 rect.ClampToCenteredSize(gfx::Size( | 361 rect.ClampToCenteredSize(gfx::Size( |
| 362 static_cast<int>(x / captureSize.height()), rect.height())); | 362 static_cast<int>(x / captureSize.height()), rect.height())); |
| 363 } | 363 } |
| 364 } | 364 } |
| 365 | 365 |
| 366 return NSRectFromCGRect(rect.ToCGRect()); | 366 return NSRectFromCGRect(rect.ToCGRect()); |
| 367 } | 367 } |
| 368 | 368 |
| 369 @end | 369 @end |
| OLD | NEW |