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

Side by Side Diff: chrome/browser/ui/cocoa/extensions/extension_install_dialog_controller.mm

Issue 17593006: mac: Update clients of scoped_nsobject.h. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: iwyu, scoped_nsprotocol Created 7 years, 5 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 #import "chrome/browser/ui/cocoa/extensions/extension_install_dialog_controller. h" 5 #import "chrome/browser/ui/cocoa/extensions/extension_install_dialog_controller. h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/logging.h" 8 #include "base/logging.h"
9 #include "base/message_loop.h" 9 #include "base/message_loop.h"
10 #include "chrome/browser/ui/browser.h" 10 #include "chrome/browser/ui/browser.h"
(...skipping 24 matching lines...) Expand all
35 35
36 ExtensionInstallDialogController::ExtensionInstallDialogController( 36 ExtensionInstallDialogController::ExtensionInstallDialogController(
37 const ExtensionInstallPrompt::ShowParams& show_params, 37 const ExtensionInstallPrompt::ShowParams& show_params,
38 ExtensionInstallPrompt::Delegate* delegate, 38 ExtensionInstallPrompt::Delegate* delegate,
39 const ExtensionInstallPrompt::Prompt& prompt) : delegate_(delegate) { 39 const ExtensionInstallPrompt::Prompt& prompt) : delegate_(delegate) {
40 view_controller_.reset([[ExtensionInstallViewController alloc] 40 view_controller_.reset([[ExtensionInstallViewController alloc]
41 initWithNavigator:show_params.navigator 41 initWithNavigator:show_params.navigator
42 delegate:this 42 delegate:this
43 prompt:prompt]); 43 prompt:prompt]);
44 44
45 scoped_nsobject<NSWindow> window([[ConstrainedWindowCustomWindow alloc] 45 base::scoped_nsobject<NSWindow> window([[ConstrainedWindowCustomWindow alloc]
46 initWithContentRect:[[view_controller_ view] bounds]]); 46 initWithContentRect:[[view_controller_ view] bounds]]);
47 [[window contentView] addSubview:[view_controller_ view]]; 47 [[window contentView] addSubview:[view_controller_ view]];
48 48
49 scoped_nsobject<CustomConstrainedWindowSheet> sheet( 49 base::scoped_nsobject<CustomConstrainedWindowSheet> sheet(
50 [[CustomConstrainedWindowSheet alloc] 50 [[CustomConstrainedWindowSheet alloc] initWithCustomWindow:window]);
51 initWithCustomWindow:window]);
52 constrained_window_.reset(new ConstrainedWindowMac( 51 constrained_window_.reset(new ConstrainedWindowMac(
53 this, show_params.parent_web_contents, sheet)); 52 this, show_params.parent_web_contents, sheet));
54 } 53 }
55 54
56 ExtensionInstallDialogController::~ExtensionInstallDialogController() { 55 ExtensionInstallDialogController::~ExtensionInstallDialogController() {
57 } 56 }
58 57
59 void ExtensionInstallDialogController::InstallUIProceed() { 58 void ExtensionInstallDialogController::InstallUIProceed() {
60 delegate_->InstallUIProceed(); 59 delegate_->InstallUIProceed();
61 delegate_ = NULL; 60 delegate_ = NULL;
(...skipping 11 matching lines...) Expand all
73 if (delegate_) 72 if (delegate_)
74 delegate_->InstallUIAbort(false); 73 delegate_->InstallUIAbort(false);
75 base::MessageLoop::current()->DeleteSoon(FROM_HERE, this); 74 base::MessageLoop::current()->DeleteSoon(FROM_HERE, this);
76 } 75 }
77 76
78 // static 77 // static
79 ExtensionInstallPrompt::ShowDialogCallback 78 ExtensionInstallPrompt::ShowDialogCallback
80 ExtensionInstallPrompt::GetDefaultShowDialogCallback() { 79 ExtensionInstallPrompt::GetDefaultShowDialogCallback() {
81 return base::Bind(&ShowExtensionInstallDialogImpl); 80 return base::Bind(&ShowExtensionInstallDialogImpl);
82 } 81 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698