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

Side by Side Diff: chrome/browser/ui/cocoa/web_intent_picker_cocoa.mm

Issue 11111022: Remove TabContents from constrained windows. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: remove unrelated gtk code Created 8 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
OLDNEW
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 #include "chrome/browser/ui/cocoa/web_intent_picker_cocoa.h" 5 #include "chrome/browser/ui/cocoa/web_intent_picker_cocoa.h"
6 6
7 #import <Cocoa/Cocoa.h> 7 #import <Cocoa/Cocoa.h>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/command_line.h" 10 #include "base/command_line.h"
(...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after
103 DCHECK(delegate); 103 DCHECK(delegate);
104 DCHECK(tab_contents); 104 DCHECK(tab_contents);
105 105
106 sheet_controller_ = [ 106 sheet_controller_ = [
107 [WebIntentPickerSheetController alloc] initWithPicker:this]; 107 [WebIntentPickerSheetController alloc] initWithPicker:this];
108 108
109 // Deleted when ConstrainedPickerSheetDelegate::DeleteDelegate() runs. 109 // Deleted when ConstrainedPickerSheetDelegate::DeleteDelegate() runs.
110 ConstrainedPickerSheetDelegate* constrained_delegate = 110 ConstrainedPickerSheetDelegate* constrained_delegate =
111 new ConstrainedPickerSheetDelegate(this, sheet_controller_); 111 new ConstrainedPickerSheetDelegate(this, sheet_controller_);
112 112
113 window_ = new ConstrainedWindowMac(tab_contents, constrained_delegate); 113 window_ = new ConstrainedWindowMac(tab_contents->web_contents(),
114 constrained_delegate);
114 } 115 }
115 116
116 WebIntentPickerCocoa::~WebIntentPickerCocoa() { 117 WebIntentPickerCocoa::~WebIntentPickerCocoa() {
117 if (model_ != NULL) 118 if (model_ != NULL)
118 model_->set_observer(NULL); 119 model_->set_observer(NULL);
119 } 120 }
120 121
121 void WebIntentPickerCocoa::OnSheetDidEnd(NSWindow* sheet) { 122 void WebIntentPickerCocoa::OnSheetDidEnd(NSWindow* sheet) {
122 [sheet orderOut:sheet_controller_]; 123 [sheet orderOut:sheet_controller_];
123 if (window_) 124 if (window_)
(...skipping 123 matching lines...) Expand 10 before | Expand all | Expand 10 after
247 } 248 }
248 249
249 void WebIntentPickerCocoa::OnChooseAnotherService() { 250 void WebIntentPickerCocoa::OnChooseAnotherService() {
250 DCHECK(delegate_); 251 DCHECK(delegate_);
251 delegate_->OnChooseAnotherService(); 252 delegate_->OnChooseAnotherService();
252 inline_disposition_tab_contents_.reset(); 253 inline_disposition_tab_contents_.reset();
253 inline_disposition_delegate_.reset(); 254 inline_disposition_delegate_.reset();
254 [sheet_controller_ setInlineDispositionTabContents:NULL]; 255 [sheet_controller_ setInlineDispositionTabContents:NULL];
255 PerformLayout(); 256 PerformLayout();
256 } 257 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/cocoa/tabs/tab_strip_controller.mm ('k') | chrome/browser/ui/constrained_window_tab_helper.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698