OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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/profiles/profile_signin_confirmation_view_contr
oller.h" | 5 #import "chrome/browser/ui/cocoa/profiles/profile_signin_confirmation_view_contr
oller.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 #include <cmath> | 8 #include <cmath> |
9 | 9 |
10 #include "base/callback_helpers.h" | 10 #include "base/callback_helpers.h" |
11 #include "base/mac/bundle_locations.h" | 11 #include "base/mac/bundle_locations.h" |
12 #include "base/strings/sys_string_conversions.h" | 12 #include "base/strings/sys_string_conversions.h" |
13 #include "base/strings/utf_string_conversions.h" | 13 #include "base/strings/utf_string_conversions.h" |
14 #include "chrome/browser/ui/browser_finder.h" | 14 #include "chrome/browser/ui/browser_finder.h" |
15 #include "chrome/browser/ui/browser_navigator.h" | 15 #include "chrome/browser/ui/browser_navigator.h" |
16 #import "chrome/browser/ui/chrome_style.h" | 16 #import "chrome/browser/ui/chrome_style.h" |
17 #import "chrome/browser/ui/cocoa/constrained_window/constrained_window_control_u
tils.h" | 17 #import "chrome/browser/ui/cocoa/constrained_window/constrained_window_control_u
tils.h" |
18 #import "chrome/browser/ui/cocoa/hover_close_button.h" | 18 #import "chrome/browser/ui/cocoa/hover_close_button.h" |
19 #include "chrome/browser/ui/host_desktop.h" | |
20 #include "chrome/browser/ui/sync/profile_signin_confirmation_helper.h" | 19 #include "chrome/browser/ui/sync/profile_signin_confirmation_helper.h" |
21 #include "chrome/common/url_constants.h" | 20 #include "chrome/common/url_constants.h" |
22 #include "chrome/grit/chromium_strings.h" | 21 #include "chrome/grit/chromium_strings.h" |
23 #include "chrome/grit/generated_resources.h" | 22 #include "chrome/grit/generated_resources.h" |
24 #include "google_apis/gaia/gaia_auth_util.h" | 23 #include "google_apis/gaia/gaia_auth_util.h" |
25 #include "skia/ext/skia_utils_mac.h" | 24 #include "skia/ext/skia_utils_mac.h" |
26 #import "third_party/google_toolbox_for_mac/src/AppKit/GTMUILocalizerAndLayoutTw
eaker.h" | 25 #import "third_party/google_toolbox_for_mac/src/AppKit/GTMUILocalizerAndLayoutTw
eaker.h" |
27 #import "ui/base/cocoa/controls/hyperlink_button_cell.h" | 26 #import "ui/base/cocoa/controls/hyperlink_button_cell.h" |
28 #import "ui/base/cocoa/controls/hyperlink_text_view.h" | 27 #import "ui/base/cocoa/controls/hyperlink_text_view.h" |
29 #include "ui/base/l10n/l10n_util.h" | 28 #include "ui/base/l10n/l10n_util.h" |
| 29 #include "ui/gfx/host_desktop_type.h" |
30 | 30 |
31 namespace { | 31 namespace { |
32 | 32 |
33 const CGFloat kWindowMinWidth = 500; | 33 const CGFloat kWindowMinWidth = 500; |
34 const CGFloat kButtonGap = 6; | 34 const CGFloat kButtonGap = 6; |
35 const CGFloat kDialogAlertBarBorderWidth = 1; | 35 const CGFloat kDialogAlertBarBorderWidth = 1; |
36 | 36 |
37 // Determine the frame required to fit the content of a string. Uses the | 37 // Determine the frame required to fit the content of a string. Uses the |
38 // provided height and width as preferred dimensions, where a value of | 38 // provided height and width as preferred dimensions, where a value of |
39 // 0.0 indicates no preference. | 39 // 0.0 indicates no preference. |
(...skipping 402 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
442 | 442 |
443 - (NSButton*)createProfileButton { | 443 - (NSButton*)createProfileButton { |
444 return createProfileButton_.get(); | 444 return createProfileButton_.get(); |
445 } | 445 } |
446 | 446 |
447 - (NSTextView*)explanationField { | 447 - (NSTextView*)explanationField { |
448 return explanationField_.get(); | 448 return explanationField_.get(); |
449 } | 449 } |
450 | 450 |
451 @end | 451 @end |
OLD | NEW |