| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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 #include "chrome/browser/ui/cocoa/autofill/new_credit_card_bubble_cocoa.h" | 5 #include "chrome/browser/ui/cocoa/autofill/new_credit_card_bubble_cocoa.h" |
| 6 | 6 |
| 7 #include "base/i18n/rtl.h" | 7 #include "base/i18n/rtl.h" |
| 8 #include "base/mac/foundation_util.h" | 8 #include "base/mac/foundation_util.h" |
| 9 #include "base/strings/sys_string_conversions.h" | 9 #include "base/strings/sys_string_conversions.h" |
| 10 #include "chrome/browser/ui/autofill/new_credit_card_bubble_controller.h" | 10 #include "chrome/browser/ui/autofill/new_credit_card_bubble_controller.h" |
| (...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 81 defer:NO]); | 81 defer:NO]); |
| 82 bridge_.reset(bridge); | 82 bridge_.reset(bridge); |
| 83 if ((self = [super initWithWindow:window | 83 if ((self = [super initWithWindow:window |
| 84 parentWindow:parentWindow | 84 parentWindow:parentWindow |
| 85 anchoredAt:NSZeroPoint])) { | 85 anchoredAt:NSZeroPoint])) { |
| 86 controller_ = controller; | 86 controller_ = controller; |
| 87 [window setInfoBubbleCanBecomeKeyWindow:NO]; | 87 [window setInfoBubbleCanBecomeKeyWindow:NO]; |
| 88 | 88 |
| 89 ui::NativeTheme* nativeTheme = ui::NativeThemeMac::instance(); | 89 ui::NativeTheme* nativeTheme = ui::NativeThemeMac::instance(); |
| 90 [[self bubble] setBackgroundColor: | 90 [[self bubble] setBackgroundColor: |
| 91 gfx::SkColorToCalibratedNSColor(nativeTheme->GetSystemColor( | 91 skia::SkColorToCalibratedNSColor(nativeTheme->GetSystemColor( |
| 92 ui::NativeTheme::kColorId_DialogBackground))]; | 92 ui::NativeTheme::kColorId_DialogBackground))]; |
| 93 [self performLayout]; | 93 [self performLayout]; |
| 94 } | 94 } |
| 95 return self; | 95 return self; |
| 96 } | 96 } |
| 97 | 97 |
| 98 - (void)showAtAnchor:(NSPoint)anchorPoint { | 98 - (void)showAtAnchor:(NSPoint)anchorPoint { |
| 99 [self setAnchorPoint:anchorPoint]; | 99 [self setAnchorPoint:anchorPoint]; |
| 100 [[self bubble] setNeedsDisplay:YES]; | 100 [[self bubble] setNeedsDisplay:YES]; |
| 101 [self showWindow:nil]; | 101 [self showWindow:nil]; |
| (...skipping 164 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 266 controller:controller_ | 266 controller:controller_ |
| 267 bridge:this]; | 267 bridge:this]; |
| 268 } | 268 } |
| 269 | 269 |
| 270 InfoBubbleWindow* NewCreditCardBubbleCocoa::GetInfoBubbleWindow() { | 270 InfoBubbleWindow* NewCreditCardBubbleCocoa::GetInfoBubbleWindow() { |
| 271 return base::mac::ObjCCastStrict<InfoBubbleWindow>( | 271 return base::mac::ObjCCastStrict<InfoBubbleWindow>( |
| 272 [bubbleController_ window]); | 272 [bubbleController_ window]); |
| 273 } | 273 } |
| 274 | 274 |
| 275 } // namespace autofill | 275 } // namespace autofill |
| OLD | NEW |