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

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

Issue 10959045: Switch WebIntentPickerController to use WebContentsUserData. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase 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/message_loop.h" 10 #include "base/message_loop.h"
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after
61 void ConstrainedPickerSheetDelegate::DeleteDelegate() { 61 void ConstrainedPickerSheetDelegate::DeleteDelegate() {
62 if (is_sheet_open()) 62 if (is_sheet_open())
63 [NSApp endSheet:sheet()]; 63 [NSApp endSheet:sheet()];
64 64
65 delete this; 65 delete this;
66 } 66 }
67 67
68 } // namespace 68 } // namespace
69 69
70 // static 70 // static
71 WebIntentPicker* WebIntentPicker::Create(TabContents* tab_contents, 71 WebIntentPicker* WebIntentPicker::Create(content::WebContents* web_contents,
72 WebIntentPickerDelegate* delegate, 72 WebIntentPickerDelegate* delegate,
73 WebIntentPickerModel* model) { 73 WebIntentPickerModel* model) {
74 TabContents* tab_contents = TabContents::FromWebContents(web_contents);
74 return new WebIntentPickerCocoa(tab_contents, delegate, model); 75 return new WebIntentPickerCocoa(tab_contents, delegate, model);
75 } 76 }
76 77
77 WebIntentPickerCocoa::WebIntentPickerCocoa() 78 WebIntentPickerCocoa::WebIntentPickerCocoa()
78 : delegate_(NULL), 79 : delegate_(NULL),
79 model_(NULL), 80 model_(NULL),
80 tab_contents_(NULL), 81 tab_contents_(NULL),
81 sheet_controller_(nil), 82 sheet_controller_(nil),
82 service_invoked(false) { 83 service_invoked(false) {
83 } 84 }
(...skipping 158 matching lines...) Expand 10 before | Expand all | Expand 10 after
242 } 243 }
243 244
244 void WebIntentPickerCocoa::OnChooseAnotherService() { 245 void WebIntentPickerCocoa::OnChooseAnotherService() {
245 DCHECK(delegate_); 246 DCHECK(delegate_);
246 delegate_->OnChooseAnotherService(); 247 delegate_->OnChooseAnotherService();
247 inline_disposition_tab_contents_.reset(); 248 inline_disposition_tab_contents_.reset();
248 inline_disposition_delegate_.reset(); 249 inline_disposition_delegate_.reset();
249 [sheet_controller_ setInlineDispositionTabContents:NULL]; 250 [sheet_controller_ setInlineDispositionTabContents:NULL];
250 PerformLayout(); 251 PerformLayout();
251 } 252 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698