Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(7)

Side by Side Diff: chrome/browser/ui/cocoa/autofill/save_card_bubble_view_bridge.mm

Issue 1775223002: Prepare chrome/ for compilation with OS X 10.7 deployment target. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase. Created 4 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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/autofill/save_card_bubble_view_bridge.h" 5 #import "chrome/browser/ui/cocoa/autofill/save_card_bubble_view_bridge.h"
6 6
7 #include "base/strings/sys_string_conversions.h" 7 #include "base/strings/sys_string_conversions.h"
8 #include "base/strings/utf_string_conversions.h" 8 #include "base/strings/utf_string_conversions.h"
9 #include "chrome/browser/ui/autofill/save_card_bubble_controller.h" 9 #include "chrome/browser/ui/autofill/save_card_bubble_controller.h"
10 #include "chrome/browser/ui/chrome_style.h" 10 #include "chrome/browser/ui/chrome_style.h"
11 #import "chrome/browser/ui/cocoa/browser_window_controller.h" 11 #import "chrome/browser/ui/cocoa/browser_window_controller.h"
12 #import "chrome/browser/ui/cocoa/info_bubble_view.h" 12 #import "chrome/browser/ui/cocoa/info_bubble_view.h"
13 #import "chrome/browser/ui/cocoa/info_bubble_window.h" 13 #import "chrome/browser/ui/cocoa/info_bubble_window.h"
14 #import "chrome/browser/ui/cocoa/toolbar/toolbar_controller.h" 14 #import "chrome/browser/ui/cocoa/toolbar/toolbar_controller.h"
15 #include "grit/components_strings.h" 15 #include "grit/components_strings.h"
16 #include "skia/ext/skia_utils_mac.h" 16 #include "skia/ext/skia_utils_mac.h"
17 #include "ui/base/cocoa/cocoa_base_utils.h"
17 #import "ui/base/cocoa/controls/hyperlink_text_view.h" 18 #import "ui/base/cocoa/controls/hyperlink_text_view.h"
18 #import "ui/base/cocoa/window_size_constants.h" 19 #import "ui/base/cocoa/window_size_constants.h"
19 #include "ui/base/l10n/l10n_util.h" 20 #include "ui/base/l10n/l10n_util.h"
20 #include "ui/base/resource/resource_bundle.h" 21 #include "ui/base/resource/resource_bundle.h"
21 22
22 namespace { 23 namespace {
23 24
24 const CGFloat kDesiredBubbleWidth = 370; 25 const CGFloat kDesiredBubbleWidth = 370;
25 const CGFloat kDividerHeight = 1; 26 const CGFloat kDividerHeight = 1;
26 const CGFloat kFramePadding = 16; 27 const CGFloat kFramePadding = 16;
(...skipping 164 matching lines...) Expand 10 before | Expand all | Expand 10 after
191 DCHECK(bridge); 192 DCHECK(bridge);
192 193
193 base::scoped_nsobject<InfoBubbleWindow> window([[InfoBubbleWindow alloc] 194 base::scoped_nsobject<InfoBubbleWindow> window([[InfoBubbleWindow alloc]
194 initWithContentRect:ui::kWindowSizeDeterminedLater 195 initWithContentRect:ui::kWindowSizeDeterminedLater
195 styleMask:NSBorderlessWindowMask 196 styleMask:NSBorderlessWindowMask
196 backing:NSBackingStoreBuffered 197 backing:NSBackingStoreBuffered
197 defer:NO]); 198 defer:NO]);
198 199
199 NSPoint anchorPoint = 200 NSPoint anchorPoint =
200 [[browserWindowController toolbarController] saveCreditCardBubblePoint]; 201 [[browserWindowController toolbarController] saveCreditCardBubblePoint];
201 anchorPoint = 202 anchorPoint = ui::ConvertPointFromWindowToScreen(
202 [[browserWindowController window] convertBaseToScreen:anchorPoint]; 203 [browserWindowController window], anchorPoint);
203 204
204 if ((self = [super initWithWindow:window 205 if ((self = [super initWithWindow:window
205 parentWindow:[browserWindowController window] 206 parentWindow:[browserWindowController window]
206 anchoredAt:anchorPoint])) { 207 anchoredAt:anchorPoint])) {
207 bridge_ = bridge; 208 bridge_ = bridge;
208 } 209 }
209 210
210 return self; 211 return self;
211 } 212 }
212 213
(...skipping 212 matching lines...) Expand 10 before | Expand all | Expand 10 after
425 } 426 }
426 } 427 }
427 428
428 // If none of the legal message links are the source of the click, the source 429 // If none of the legal message links are the source of the click, the source
429 // must be the learn more link. 430 // must be the learn more link.
430 bridge_->OnLearnMoreClicked(); 431 bridge_->OnLearnMoreClicked();
431 return YES; 432 return YES;
432 } 433 }
433 434
434 @end 435 @end
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698