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" | 11 #import "chrome/browser/ui/cocoa/hyperlink_text_view.h" |
12 #include "chrome/browser/ui/sync/one_click_signin_helper.h" | 12 #include "chrome/browser/ui/sync/one_click_signin_helper.h" |
13 #include "chrome/browser/ui/sync/one_click_signin_histogram.h" | 13 #include "chrome/browser/ui/sync/one_click_signin_histogram.h" |
14 #include "chrome/common/url_constants.h" | 14 #include "chrome/common/url_constants.h" |
15 #include "content/public/browser/web_contents.h" | 15 #include "content/public/browser/web_contents.h" |
16 #include "grit/chromium_strings.h" | 16 #include "grit/chromium_strings.h" |
17 #include "grit/generated_resources.h" | 17 #include "grit/generated_resources.h" |
18 #include "skia/ext/skia_utils_mac.h" | 18 #include "skia/ext/skia_utils_mac.h" |
19 #import "third_party/GTM/AppKit/GTMUILocalizerAndLayoutTweaker.h" | 19 #import "third_party/google_toolbox_for_mac/src/AppKit/GTMUILocalizerAndLayoutTw
eaker.h" |
20 #include "ui/base/l10n/l10n_util_mac.h" | 20 #include "ui/base/l10n/l10n_util_mac.h" |
21 | 21 |
22 namespace { | 22 namespace { |
23 | 23 |
24 // Shift the origin of |view|'s frame by the given amount in the | 24 // Shift the origin of |view|'s frame by the given amount in the |
25 // positive y direction (up). | 25 // positive y direction (up). |
26 void ShiftOriginY(NSView* view, CGFloat amount) { | 26 void ShiftOriginY(NSView* view, CGFloat amount) { |
27 NSPoint origin = [view frame].origin; | 27 NSPoint origin = [view frame].origin; |
28 origin.y += amount; | 28 origin.y += amount; |
29 [view setFrameOrigin:origin]; | 29 [view setFrameOrigin:origin]; |
(...skipping 228 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
258 content::PAGE_TRANSITION_LINK, false); | 258 content::PAGE_TRANSITION_LINK, false); |
259 webContents_->OpenURL(params); | 259 webContents_->OpenURL(params); |
260 return YES; | 260 return YES; |
261 } | 261 } |
262 | 262 |
263 - (void)close { | 263 - (void)close { |
264 base::ResetAndReturn(&closeCallback_).Run(); | 264 base::ResetAndReturn(&closeCallback_).Run(); |
265 } | 265 } |
266 | 266 |
267 @end | 267 @end |
OLD | NEW |