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 #include "base/memory/scoped_ptr.h" | 5 #include "base/memory/scoped_ptr.h" |
6 #include "chrome/browser/ui/autofill/save_card_bubble_controller.h" | 6 #include "chrome/browser/ui/autofill/save_card_bubble_controller.h" |
7 #import "chrome/browser/ui/cocoa/autofill/save_card_bubble_view_bridge.h" | 7 #import "chrome/browser/ui/cocoa/autofill/save_card_bubble_view_bridge.h" |
8 #import "chrome/browser/ui/cocoa/browser_window_controller.h" | 8 #import "chrome/browser/ui/cocoa/browser_window_controller.h" |
9 #include "chrome/browser/ui/cocoa/cocoa_profile_test.h" | 9 #include "chrome/browser/ui/cocoa/cocoa_profile_test.h" |
10 #include "testing/gtest/include/gtest/gtest.h" | 10 #include "testing/gtest/include/gtest/gtest.h" |
11 | 11 |
12 namespace autofill { | 12 namespace autofill { |
13 | 13 |
14 namespace { | 14 namespace { |
15 | 15 |
16 class TestSaveCardBubbleController : public SaveCardBubbleController { | 16 class TestSaveCardBubbleController : public SaveCardBubbleController { |
17 public: | 17 public: |
18 static scoped_ptr<TestSaveCardBubbleController> CreateForTesting() { | 18 static scoped_ptr<TestSaveCardBubbleController> CreateForTesting() { |
19 return scoped_ptr<TestSaveCardBubbleController>( | 19 return scoped_ptr<TestSaveCardBubbleController>( |
20 new TestSaveCardBubbleController()); | 20 new TestSaveCardBubbleController()); |
21 } | 21 } |
22 | 22 |
23 // SaveCardBubbleController: | 23 // SaveCardBubbleController: |
24 base::string16 GetWindowTitle() const override { return base::string16(); } | 24 base::string16 GetWindowTitle() const override { return base::string16(); } |
25 | 25 |
26 base::string16 GetExplanatoryMessage() const override { | 26 base::string16 GetExplanatoryMessage() const override { |
27 return base::string16(); | 27 return base::string16(); |
28 } | 28 } |
29 | 29 |
| 30 void HideBubble() override {} |
30 void OnSaveButton() override {} | 31 void OnSaveButton() override {} |
31 void OnCancelButton() override {} | 32 void OnCancelButton() override {} |
32 void OnLearnMoreClicked() override {} | 33 void OnLearnMoreClicked() override {} |
33 void OnLegalMessageLinkClicked(const GURL& url) override {} | 34 void OnLegalMessageLinkClicked(const GURL& url) override {} |
34 void OnBubbleClosed() override {} | 35 void OnBubbleClosed() override {} |
35 | 36 |
36 const LegalMessageLines& GetLegalMessageLines() const override { | 37 const LegalMessageLines& GetLegalMessageLines() const override { |
37 return *lines_; | 38 return *lines_; |
38 } | 39 } |
39 | 40 |
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
74 // This will show the SaveCardBubbleViewCocoa. | 75 // This will show the SaveCardBubbleViewCocoa. |
75 SaveCardBubbleViewBridge* bridge = new SaveCardBubbleViewBridge( | 76 SaveCardBubbleViewBridge* bridge = new SaveCardBubbleViewBridge( |
76 bubble_controller.get(), browser_window_controller_); | 77 bubble_controller.get(), browser_window_controller_); |
77 | 78 |
78 // This sends -close to the SaveCardBubbleViewCocoa, and causes bridge to | 79 // This sends -close to the SaveCardBubbleViewCocoa, and causes bridge to |
79 // delete itself. | 80 // delete itself. |
80 bridge->Hide(); | 81 bridge->Hide(); |
81 } | 82 } |
82 | 83 |
83 } // namespace autofill | 84 } // namespace autofill |
OLD | NEW |