| OLD | NEW |
| 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 "base/scoped_nsobject.h" | 7 #include "base/scoped_nsobject.h" |
| 8 #include "chrome/common/notification_details.h" | |
| 9 #include "chrome/common/notification_observer.h" | |
| 10 #include "chrome/common/notification_registrar.h" | |
| 11 #include "chrome/common/notification_source.h" | |
| 12 #include "chrome/common/notification_type.h" | |
| 13 #include "content/browser/renderer_host/render_view_host.h" | 8 #include "content/browser/renderer_host/render_view_host.h" |
| 14 #include "content/browser/renderer_host/render_widget_host_view.h" | 9 #include "content/browser/renderer_host/render_widget_host_view.h" |
| 15 #include "content/browser/tab_contents/navigation_controller.h" | 10 #include "content/browser/tab_contents/navigation_controller.h" |
| 16 #include "content/browser/tab_contents/tab_contents.h" | 11 #include "content/browser/tab_contents/tab_contents.h" |
| 12 #include "content/common/notification_details.h" |
| 13 #include "content/common/notification_observer.h" |
| 14 #include "content/common/notification_registrar.h" |
| 15 #include "content/common/notification_source.h" |
| 16 #include "content/common/notification_type.h" |
| 17 | 17 |
| 18 @interface TabContentsController(Private) | 18 @interface TabContentsController(Private) |
| 19 // Forwards frame update to |delegate_| (ResizeNotificationView calls it). | 19 // Forwards frame update to |delegate_| (ResizeNotificationView calls it). |
| 20 - (void)tabContentsViewFrameWillChange:(NSRect)frameRect; | 20 - (void)tabContentsViewFrameWillChange:(NSRect)frameRect; |
| 21 // Notification from TabContents (forwarded by TabContentsNotificationBridge). | 21 // Notification from TabContents (forwarded by TabContentsNotificationBridge). |
| 22 - (void)tabContentsRenderViewHostChanged:(RenderViewHost*)oldHost | 22 - (void)tabContentsRenderViewHostChanged:(RenderViewHost*)oldHost |
| 23 newHost:(RenderViewHost*)newHost; | 23 newHost:(RenderViewHost*)newHost; |
| 24 @end | 24 @end |
| 25 | 25 |
| 26 | 26 |
| (...skipping 174 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 201 // the view may have, so avoid changing the view hierarchy unless | 201 // the view may have, so avoid changing the view hierarchy unless |
| 202 // the view is different. | 202 // the view is different. |
| 203 if ([self tabContents] != updatedContents) { | 203 if ([self tabContents] != updatedContents) { |
| 204 [self changeTabContents:updatedContents]; | 204 [self changeTabContents:updatedContents]; |
| 205 if ([self tabContents]) | 205 if ([self tabContents]) |
| 206 [self ensureContentsVisible]; | 206 [self ensureContentsVisible]; |
| 207 } | 207 } |
| 208 } | 208 } |
| 209 | 209 |
| 210 @end | 210 @end |
| OLD | NEW |