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/instant_confirm_window_controller.h" | 5 #import "chrome/browser/ui/cocoa/instant_confirm_window_controller.h" |
6 | 6 |
7 #include "base/logging.h" | 7 #include "base/logging.h" |
8 #include "base/mac_util.h" | 8 #include "base/mac_util.h" |
9 #include "chrome/browser/instant/instant_confirm_dialog.h" | 9 #include "chrome/browser/instant/instant_confirm_dialog.h" |
10 #include "chrome/browser/instant/instant_controller.h" | 10 #include "chrome/browser/instant/instant_controller.h" |
11 #include "chrome/browser/profile.h" | 11 #include "chrome/browser/profile.h" |
12 #include "chrome/browser/show_options_url.h" | 12 #include "chrome/browser/ui/options/show_options_url.h" |
13 #include "gfx/native_widget_types.h" | 13 #include "gfx/native_widget_types.h" |
14 #include "googleurl/src/gurl.h" | 14 #include "googleurl/src/gurl.h" |
15 #import "third_party/GTM/AppKit/GTMUILocalizerAndLayoutTweaker.h" | 15 #import "third_party/GTM/AppKit/GTMUILocalizerAndLayoutTweaker.h" |
16 | 16 |
17 namespace browser { | 17 namespace browser { |
18 | 18 |
19 void ShowInstantConfirmDialog(gfx::NativeWindow parent, Profile* profile) { | 19 void ShowInstantConfirmDialog(gfx::NativeWindow parent, Profile* profile) { |
20 InstantConfirmWindowController* controller = | 20 InstantConfirmWindowController* controller = |
21 [[InstantConfirmWindowController alloc] initWithProfile:profile]; | 21 [[InstantConfirmWindowController alloc] initWithProfile:profile]; |
22 [NSApp beginSheet:[controller window] | 22 [NSApp beginSheet:[controller window] |
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
67 InstantController::Enable(profile_); | 67 InstantController::Enable(profile_); |
68 [self cancel:sender]; | 68 [self cancel:sender]; |
69 } | 69 } |
70 | 70 |
71 - (IBAction)cancel:(id)sender { | 71 - (IBAction)cancel:(id)sender { |
72 [NSApp endSheet:[self window]]; | 72 [NSApp endSheet:[self window]]; |
73 [[self window] close]; | 73 [[self window] close]; |
74 } | 74 } |
75 | 75 |
76 @end | 76 @end |
OLD | NEW |