| OLD | NEW |
| 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" | |
| 10 #import "chrome/browser/ui/cocoa/browser_window_controller.h" | 9 #import "chrome/browser/ui/cocoa/browser_window_controller.h" |
| 11 #include "chrome/browser/ui/cocoa/chrome_style.h" | 10 #include "chrome/browser/ui/cocoa/chrome_style.h" |
| 12 #import "chrome/browser/ui/cocoa/info_bubble_view.h" | 11 #import "chrome/browser/ui/cocoa/info_bubble_view.h" |
| 13 #import "chrome/browser/ui/cocoa/info_bubble_window.h" | 12 #import "chrome/browser/ui/cocoa/info_bubble_window.h" |
| 14 #import "chrome/browser/ui/cocoa/toolbar/toolbar_controller.h" | 13 #import "chrome/browser/ui/cocoa/toolbar/toolbar_controller.h" |
| 14 #include "components/autofill/core/browser/ui/save_card_bubble_controller.h" |
| 15 #include "components/strings/grit/components_strings.h" | 15 #include "components/strings/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 #include "ui/base/cocoa/cocoa_base_utils.h" |
| 18 #import "ui/base/cocoa/controls/hyperlink_text_view.h" | 18 #import "ui/base/cocoa/controls/hyperlink_text_view.h" |
| 19 #import "ui/base/cocoa/window_size_constants.h" | 19 #import "ui/base/cocoa/window_size_constants.h" |
| 20 #include "ui/base/l10n/l10n_util.h" | 20 #include "ui/base/l10n/l10n_util.h" |
| 21 #include "ui/base/resource/resource_bundle.h" | 21 #include "ui/base/resource/resource_bundle.h" |
| 22 | 22 |
| 23 namespace { | 23 namespace { |
| 24 | 24 |
| (...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 64 return controller_ ? controller_->GetCard() : CreditCard(); | 64 return controller_ ? controller_->GetCard() : CreditCard(); |
| 65 } | 65 } |
| 66 | 66 |
| 67 const LegalMessageLines SaveCardBubbleViewBridge::GetLegalMessageLines() const { | 67 const LegalMessageLines SaveCardBubbleViewBridge::GetLegalMessageLines() const { |
| 68 return controller_ ? controller_->GetLegalMessageLines() | 68 return controller_ ? controller_->GetLegalMessageLines() |
| 69 : LegalMessageLines(); | 69 : LegalMessageLines(); |
| 70 } | 70 } |
| 71 | 71 |
| 72 void SaveCardBubbleViewBridge::OnSaveButton() { | 72 void SaveCardBubbleViewBridge::OnSaveButton() { |
| 73 if (controller_) | 73 if (controller_) |
| 74 controller_->OnSaveButton(); | 74 controller_->OnSaveButton(base::string16()); |
| 75 Hide(); | 75 Hide(); |
| 76 } | 76 } |
| 77 | 77 |
| 78 void SaveCardBubbleViewBridge::OnCancelButton() { | 78 void SaveCardBubbleViewBridge::OnCancelButton() { |
| 79 if (controller_) | 79 if (controller_) |
| 80 controller_->OnCancelButton(); | 80 controller_->OnCancelButton(); |
| 81 Hide(); | 81 Hide(); |
| 82 } | 82 } |
| 83 | 83 |
| 84 void SaveCardBubbleViewBridge::OnLearnMoreClicked() { | 84 void SaveCardBubbleViewBridge::OnLearnMoreClicked() { |
| (...skipping 343 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 428 } | 428 } |
| 429 } | 429 } |
| 430 | 430 |
| 431 // If none of the legal message links are the source of the click, the source | 431 // If none of the legal message links are the source of the click, the source |
| 432 // must be the learn more link. | 432 // must be the learn more link. |
| 433 bridge_->OnLearnMoreClicked(); | 433 bridge_->OnLearnMoreClicked(); |
| 434 return YES; | 434 return YES; |
| 435 } | 435 } |
| 436 | 436 |
| 437 @end | 437 @end |
| OLD | NEW |