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

Side by Side Diff: chrome/browser/cocoa/first_run_dialog.mm

Issue 4192012: Convert implicit scoped_refptr constructor calls to explicit ones, part 1 (Closed) Base URL: http://git.chromium.org/git/chromium.git
Patch Set: fix presubmit Created 10 years, 1 month 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) 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 "chrome/browser/cocoa/first_run_dialog.h" 5 #import "chrome/browser/cocoa/first_run_dialog.h"
6 6
7 #include "app/l10n_util_mac.h" 7 #include "app/l10n_util_mac.h"
8 #include "base/mac_util.h" 8 #include "base/mac_util.h"
9 #include "base/message_loop.h" 9 #include "base/message_loop.h"
10 #include "base/ref_counted.h" 10 #include "base/ref_counted.h"
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after
70 70
71 - (void)dealloc { 71 - (void)dealloc {
72 [super dealloc]; 72 [super dealloc];
73 } 73 }
74 74
75 - (IBAction)showWindow:(id)sender { 75 - (IBAction)showWindow:(id)sender {
76 // The main MessageLoop has not yet run, but has been spun. If we call 76 // The main MessageLoop has not yet run, but has been spun. If we call
77 // -[NSApplication runModalForWindow:] we will hang <http://crbug.com/54248>. 77 // -[NSApplication runModalForWindow:] we will hang <http://crbug.com/54248>.
78 // Therefore the main MessageLoop is run so things work. 78 // Therefore the main MessageLoop is run so things work.
79 79
80 scoped_refptr<FirstRunShowBridge> bridge = new FirstRunShowBridge(self); 80 scoped_refptr<FirstRunShowBridge> bridge(new FirstRunShowBridge(self));
81 MessageLoop::current()->PostTask( 81 MessageLoop::current()->PostTask(
82 FROM_HERE, 82 FROM_HERE,
83 NewRunnableMethod(bridge.get(), 83 NewRunnableMethod(bridge.get(),
84 &FirstRunShowBridge::ShowDialog)); 84 &FirstRunShowBridge::ShowDialog));
85 MessageLoop::current()->Run(); 85 MessageLoop::current()->Run();
86 } 86 }
87 87
88 - (void)show { 88 - (void)show {
89 NSWindow* win = [self window]; 89 NSWindow* win = [self window];
90 90
(...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after
186 [NSApp stopModal]; 186 [NSApp stopModal];
187 } 187 }
188 188
189 - (IBAction)learnMore:(id)sender { 189 - (IBAction)learnMore:(id)sender {
190 NSString* urlStr = l10n_util::GetNSString(IDS_LEARN_MORE_REPORTING_URL); 190 NSString* urlStr = l10n_util::GetNSString(IDS_LEARN_MORE_REPORTING_URL);
191 NSURL* learnMoreUrl = [NSURL URLWithString:urlStr]; 191 NSURL* learnMoreUrl = [NSURL URLWithString:urlStr];
192 [[NSWorkspace sharedWorkspace] openURL:learnMoreUrl]; 192 [[NSWorkspace sharedWorkspace] openURL:learnMoreUrl];
193 } 193 }
194 194
195 @end 195 @end
OLDNEW
« no previous file with comments | « chrome/browser/browsing_data_local_storage_helper_unittest.cc ('k') | chrome/browser/cocoa/web_drag_source.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698