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/one_click_signin_view_controller.h" | 5 #import "chrome/browser/ui/cocoa/one_click_signin_view_controller.h" |
6 | 6 |
7 #include "base/callback_helpers.h" | 7 #include "base/callback_helpers.h" |
8 #include "base/logging.h" | 8 #include "base/logging.h" |
9 #include "base/mac/bundle_locations.h" | 9 #include "base/mac/bundle_locations.h" |
10 #import "chrome/browser/ui/chrome_style.h" | 10 #import "chrome/browser/ui/chrome_style.h" |
11 #import "chrome/browser/ui/cocoa/hyperlink_text_view.h" | |
12 #include "chrome/browser/ui/sync/one_click_signin_helper.h" | 11 #include "chrome/browser/ui/sync/one_click_signin_helper.h" |
13 #include "chrome/browser/ui/sync/one_click_signin_histogram.h" | 12 #include "chrome/browser/ui/sync/one_click_signin_histogram.h" |
14 #include "chrome/common/url_constants.h" | 13 #include "chrome/common/url_constants.h" |
15 #include "chrome/grit/chromium_strings.h" | 14 #include "chrome/grit/chromium_strings.h" |
16 #include "chrome/grit/generated_resources.h" | 15 #include "chrome/grit/generated_resources.h" |
17 #include "content/public/browser/web_contents.h" | 16 #include "content/public/browser/web_contents.h" |
18 #include "grit/components_strings.h" | 17 #include "grit/components_strings.h" |
19 #include "skia/ext/skia_utils_mac.h" | 18 #include "skia/ext/skia_utils_mac.h" |
20 #import "third_party/google_toolbox_for_mac/src/AppKit/GTMUILocalizerAndLayoutTw
eaker.h" | 19 #import "third_party/google_toolbox_for_mac/src/AppKit/GTMUILocalizerAndLayoutTw
eaker.h" |
| 20 #import "ui/base/cocoa/controls/hyperlink_text_view.h" |
21 #include "ui/base/l10n/l10n_util_mac.h" | 21 #include "ui/base/l10n/l10n_util_mac.h" |
22 | 22 |
23 namespace { | 23 namespace { |
24 | 24 |
25 // The margin between the top edge of the border and the error message text in | 25 // The margin between the top edge of the border and the error message text in |
26 // the sign-in bubble, in the case of an error. | 26 // the sign-in bubble, in the case of an error. |
27 const CGFloat kTopErrorMessageMargin = 12; | 27 const CGFloat kTopErrorMessageMargin = 12; |
28 | 28 |
29 // Shift the origin of |view|'s frame by the given amount in the | 29 // Shift the origin of |view|'s frame by the given amount in the |
30 // positive y direction (up). | 30 // positive y direction (up). |
(...skipping 264 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
295 ui::PAGE_TRANSITION_LINK, false); | 295 ui::PAGE_TRANSITION_LINK, false); |
296 webContents_->OpenURL(params); | 296 webContents_->OpenURL(params); |
297 return YES; | 297 return YES; |
298 } | 298 } |
299 | 299 |
300 - (void)close { | 300 - (void)close { |
301 base::ResetAndReturn(&closeCallback_).Run(); | 301 base::ResetAndReturn(&closeCallback_).Run(); |
302 } | 302 } |
303 | 303 |
304 @end | 304 @end |
OLD | NEW |