| 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/memory/scoped_nsobject.h" | 9 #include "base/memory/scoped_nsobject.h" |
| 10 #include "content/browser/renderer_host/render_view_host.h" | 10 #include "content/browser/renderer_host/render_view_host.h" |
| 11 #include "content/browser/renderer_host/render_widget_host_view.h" | 11 #include "content/public/browser/render_widget_host_view.h" |
| 12 #include "content/public/browser/web_contents.h" | 12 #include "content/public/browser/web_contents.h" |
| 13 | 13 |
| 14 using content::WebContents; | 14 using content::WebContents; |
| 15 | 15 |
| 16 | 16 |
| 17 @implementation TabContentsController | 17 @implementation TabContentsController |
| 18 @synthesize webContents = contents_; | 18 @synthesize webContents = contents_; |
| 19 | 19 |
| 20 - (id)initWithContents:(WebContents*)contents { | 20 - (id)initWithContents:(WebContents*)contents { |
| 21 if ((self = [super initWithNibName:nil bundle:nil])) { | 21 if ((self = [super initWithNibName:nil bundle:nil])) { |
| (...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 92 // Calling setContentView: here removes any first responder status | 92 // Calling setContentView: here removes any first responder status |
| 93 // the view may have, so avoid changing the view hierarchy unless | 93 // the view may have, so avoid changing the view hierarchy unless |
| 94 // the view is different. | 94 // the view is different. |
| 95 if ([self webContents] != updatedContents) { | 95 if ([self webContents] != updatedContents) { |
| 96 contents_ = updatedContents; | 96 contents_ = updatedContents; |
| 97 [self ensureContentsVisible]; | 97 [self ensureContentsVisible]; |
| 98 } | 98 } |
| 99 } | 99 } |
| 100 | 100 |
| 101 @end | 101 @end |
| OLD | NEW |