Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(112)

Side by Side Diff: chrome/browser/tab_contents/tab_contents_view_mac.mm

Issue 3624001: Implement Instant on Mac (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 10 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « chrome/browser/cocoa/previewable_contents_controller.mm ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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 <Carbon/Carbon.h> 5 #import <Carbon/Carbon.h>
6 6
7 #include "chrome/browser/tab_contents/tab_contents_view_mac.h" 7 #include "chrome/browser/tab_contents/tab_contents_view_mac.h"
8 8
9 #include <string> 9 #include <string>
10 10
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after
73 // This handles the case where a renderer close call was deferred 73 // This handles the case where a renderer close call was deferred
74 // while the user was operating a UI control which resulted in a 74 // while the user was operating a UI control which resulted in a
75 // close. In that case, the Cocoa view outlives the 75 // close. In that case, the Cocoa view outlives the
76 // TabContentsViewMac instance due to Cocoa retain count. 76 // TabContentsViewMac instance due to Cocoa retain count.
77 [cocoa_view_ cancelDeferredClose]; 77 [cocoa_view_ cancelDeferredClose];
78 } 78 }
79 79
80 void TabContentsViewMac::CreateView(const gfx::Size& initial_size) { 80 void TabContentsViewMac::CreateView(const gfx::Size& initial_size) {
81 TabContentsViewCocoa* view = 81 TabContentsViewCocoa* view =
82 [[TabContentsViewCocoa alloc] initWithTabContentsViewMac:this]; 82 [[TabContentsViewCocoa alloc] initWithTabContentsViewMac:this];
83 [view setAutoresizingMask:(NSViewWidthSizable | NSViewHeightSizable)];
83 cocoa_view_.reset(view); 84 cocoa_view_.reset(view);
84 } 85 }
85 86
86 RenderWidgetHostView* TabContentsViewMac::CreateViewForWidget( 87 RenderWidgetHostView* TabContentsViewMac::CreateViewForWidget(
87 RenderWidgetHost* render_widget_host) { 88 RenderWidgetHost* render_widget_host) {
88 if (render_widget_host->view()) { 89 if (render_widget_host->view()) {
89 // During testing, the view will already be set up in most cases to the 90 // During testing, the view will already be set up in most cases to the
90 // test view, so we don't want to clobber it with a real one. To verify that 91 // test view, so we don't want to clobber it with a real one. To verify that
91 // this actually is happening (and somebody isn't accidentally creating the 92 // this actually is happening (and somebody isn't accidentally creating the
92 // view twice), we check for the RVH Factory, which will be set when we're 93 // view twice), we check for the RVH Factory, which will be set when we're
(...skipping 371 matching lines...) Expand 10 before | Expand all | Expand 10 after
464 [NSObject cancelPreviousPerformRequestsWithTarget:self 465 [NSObject cancelPreviousPerformRequestsWithTarget:self
465 selector:aSel 466 selector:aSel
466 object:nil]; 467 object:nil];
467 } 468 }
468 469
469 - (void)closeTabAfterEvent { 470 - (void)closeTabAfterEvent {
470 tabContentsView_->CloseTab(); 471 tabContentsView_->CloseTab();
471 } 472 }
472 473
473 @end 474 @end
OLDNEW
« no previous file with comments | « chrome/browser/cocoa/previewable_contents_controller.mm ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698