OLD | NEW |
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/first_run_dialog.h" | 5 #import "chrome/browser/ui/cocoa/first_run_dialog.h" |
6 | 6 |
7 #include "base/bind.h" | 7 #include "base/bind.h" |
8 #include "base/mac/bundle_locations.h" | 8 #include "base/mac/bundle_locations.h" |
9 #include "base/mac/mac_util.h" | 9 #include "base/mac/mac_util.h" |
10 #include "base/memory/ref_counted.h" | 10 #include "base/memory/ref_counted.h" |
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
47 if (y1 < y2) | 47 if (y1 < y2) |
48 return NSOrderedAscending; | 48 return NSOrderedAscending; |
49 else if (y1 > y2) | 49 else if (y1 > y2) |
50 return NSOrderedDescending; | 50 return NSOrderedDescending; |
51 else | 51 else |
52 return NSOrderedSame; | 52 return NSOrderedSame; |
53 } | 53 } |
54 | 54 |
55 class FirstRunShowBridge : public base::RefCounted<FirstRunShowBridge> { | 55 class FirstRunShowBridge : public base::RefCounted<FirstRunShowBridge> { |
56 public: | 56 public: |
57 FirstRunShowBridge(FirstRunDialogController* controller); | 57 explicit FirstRunShowBridge(FirstRunDialogController* controller); |
58 | 58 |
59 void ShowDialog(); | 59 void ShowDialog(); |
60 | 60 |
61 private: | 61 private: |
62 friend class base::RefCounted<FirstRunShowBridge>; | 62 friend class base::RefCounted<FirstRunShowBridge>; |
63 | 63 |
64 ~FirstRunShowBridge(); | 64 ~FirstRunShowBridge(); |
65 | 65 |
66 FirstRunDialogController* controller_; | 66 FirstRunDialogController* controller_; |
67 }; | 67 }; |
(...skipping 218 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
286 [NSApp stopModal]; | 286 [NSApp stopModal]; |
287 } | 287 } |
288 | 288 |
289 - (IBAction)learnMore:(id)sender { | 289 - (IBAction)learnMore:(id)sender { |
290 NSString* urlStr = base::SysUTF8ToNSString(chrome::kLearnMoreReportingURL); | 290 NSString* urlStr = base::SysUTF8ToNSString(chrome::kLearnMoreReportingURL); |
291 NSURL* learnMoreUrl = [NSURL URLWithString:urlStr]; | 291 NSURL* learnMoreUrl = [NSURL URLWithString:urlStr]; |
292 [[NSWorkspace sharedWorkspace] openURL:learnMoreUrl]; | 292 [[NSWorkspace sharedWorkspace] openURL:learnMoreUrl]; |
293 } | 293 } |
294 | 294 |
295 @end | 295 @end |
OLD | NEW |