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

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

Issue 1162393003: Replace info_bubble::BubbleArrowLocation with views::BubbleBorder::Arrow (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix compile in test Created 5 years, 6 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 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/generated_credit_card_bubble_cocoa.h" 5 #include "chrome/browser/ui/cocoa/autofill/generated_credit_card_bubble_cocoa.h"
6 6
7 #include "base/mac/foundation_util.h" 7 #include "base/mac/foundation_util.h"
8 #include "base/mac/scoped_nsobject.h" 8 #include "base/mac/scoped_nsobject.h"
9 #include "base/strings/sys_string_conversions.h" 9 #include "base/strings/sys_string_conversions.h"
10 #include "chrome/browser/ui/autofill/generated_credit_card_bubble_controller.h" 10 #include "chrome/browser/ui/autofill/generated_credit_card_bubble_controller.h"
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after
64 backing:NSBackingStoreBuffered 64 backing:NSBackingStoreBuffered
65 defer:NO]); 65 defer:NO]);
66 if ((self = [super initWithWindow:window 66 if ((self = [super initWithWindow:window
67 parentWindow:parentWindow 67 parentWindow:parentWindow
68 anchoredAt:NSZeroPoint])) { 68 anchoredAt:NSZeroPoint])) {
69 [window setInfoBubbleCanBecomeKeyWindow:NO]; 69 [window setInfoBubbleCanBecomeKeyWindow:NO];
70 bridge_.reset(bridge); 70 bridge_.reset(bridge);
71 71
72 ui::NativeTheme* nativeTheme = ui::NativeTheme::instance(); 72 ui::NativeTheme* nativeTheme = ui::NativeTheme::instance();
73 [[self bubble] setAlignment:info_bubble::kAlignArrowToAnchor]; 73 [[self bubble] setAlignment:info_bubble::kAlignArrowToAnchor];
74 [[self bubble] setArrowLocation:info_bubble::kTopRight]; 74 [[self bubble] setArrowLocation:views::BubbleBorder::TOP_RIGHT];
75 [[self bubble] setBackgroundColor: 75 [[self bubble] setBackgroundColor:
76 gfx::SkColorToCalibratedNSColor(nativeTheme->GetSystemColor( 76 gfx::SkColorToCalibratedNSColor(nativeTheme->GetSystemColor(
77 ui::NativeTheme::kColorId_DialogBackground))]; 77 ui::NativeTheme::kColorId_DialogBackground))];
78 [self performLayoutWithController:bridge->controller().get()]; 78 [self performLayoutWithController:bridge->controller().get()];
79 } 79 }
80 return self; 80 return self;
81 } 81 }
82 82
83 - (void)windowWillClose:(NSNotification*)notification { 83 - (void)windowWillClose:(NSNotification*)notification {
84 bridge_->OnBubbleClosing(); 84 bridge_->OnBubbleClosing();
(...skipping 151 matching lines...) Expand 10 before | Expand all | Expand 10 after
236 void GeneratedCreditCardBubbleCocoa::OnBubbleClosing() { 236 void GeneratedCreditCardBubbleCocoa::OnBubbleClosing() {
237 bubbleController_ = nil; 237 bubbleController_ = nil;
238 } 238 }
239 239
240 void GeneratedCreditCardBubbleCocoa::OnLinkClicked() { 240 void GeneratedCreditCardBubbleCocoa::OnLinkClicked() {
241 if (controller_) 241 if (controller_)
242 controller_->OnLinkClicked(); 242 controller_->OnLinkClicked();
243 } 243 }
244 244
245 } // autofill 245 } // autofill
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698