OLD | NEW |
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/ui/cocoa/search_engine_dialog_controller.h" | 5 #import "chrome/browser/ui/cocoa/search_engine_dialog_controller.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 | 8 |
9 #include "app/l10n_util_mac.h" | 9 #include "app/l10n_util_mac.h" |
10 #include "app/resource_bundle.h" | 10 #include "app/resource_bundle.h" |
11 #include "base/mac_util.h" | 11 #include "base/mac/mac_util.h" |
12 #include "base/sys_string_conversions.h" | 12 #include "base/sys_string_conversions.h" |
13 #include "base/time.h" | 13 #include "base/time.h" |
14 #include "chrome/browser/profiles/profile.h" | 14 #include "chrome/browser/profiles/profile.h" |
15 #include "chrome/browser/search_engines/template_url.h" | 15 #include "chrome/browser/search_engines/template_url.h" |
16 #include "chrome/browser/search_engines/template_url_model.h" | 16 #include "chrome/browser/search_engines/template_url_model.h" |
17 #include "chrome/browser/search_engines/template_url_model_observer.h" | 17 #include "chrome/browser/search_engines/template_url_model_observer.h" |
18 #include "grit/generated_resources.h" | 18 #include "grit/generated_resources.h" |
19 #include "grit/theme_resources.h" | 19 #include "grit/theme_resources.h" |
20 #import "third_party/GTM/AppKit/GTMUILocalizerAndLayoutTweaker.h" | 20 #import "third_party/GTM/AppKit/GTMUILocalizerAndLayoutTweaker.h" |
21 | 21 |
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
61 MessageLoop::current()->QuitNow(); | 61 MessageLoop::current()->QuitNow(); |
62 } | 62 } |
63 | 63 |
64 @implementation SearchEngineDialogController | 64 @implementation SearchEngineDialogController |
65 | 65 |
66 @synthesize profile = profile_; | 66 @synthesize profile = profile_; |
67 @synthesize randomize = randomize_; | 67 @synthesize randomize = randomize_; |
68 | 68 |
69 - (id)init { | 69 - (id)init { |
70 NSString* nibpath = | 70 NSString* nibpath = |
71 [mac_util::MainAppBundle() pathForResource:@"SearchEngineDialog" | 71 [base::mac::MainAppBundle() pathForResource:@"SearchEngineDialog" |
72 ofType:@"nib"]; | 72 ofType:@"nib"]; |
73 self = [super initWithWindowNibPath:nibpath owner:self]; | 73 self = [super initWithWindowNibPath:nibpath owner:self]; |
74 if (self != nil) { | 74 if (self != nil) { |
75 bridge_ = new SearchEngineDialogControllerBridge(self); | 75 bridge_ = new SearchEngineDialogControllerBridge(self); |
76 } | 76 } |
77 return self; | 77 return self; |
78 } | 78 } |
79 | 79 |
80 - (void)dealloc { | 80 - (void)dealloc { |
81 [super dealloc]; | 81 [super dealloc]; |
(...skipping 193 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
275 - (NSFont*)mainLabelFont { | 275 - (NSFont*)mainLabelFont { |
276 return [NSFont boldSystemFontOfSize:13]; | 276 return [NSFont boldSystemFontOfSize:13]; |
277 } | 277 } |
278 | 278 |
279 - (IBAction)searchEngineSelected:(id)sender { | 279 - (IBAction)searchEngineSelected:(id)sender { |
280 [[self window] close]; | 280 [[self window] close]; |
281 [NSApp stopModalWithCode:[sender tag]]; | 281 [NSApp stopModalWithCode:[sender tag]]; |
282 } | 282 } |
283 | 283 |
284 @end | 284 @end |
OLD | NEW |