| 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 #ifndef CHROME_BROWSER_UI_AUTOFILL_SAVE_CARD_BUBBLE_CONTROLLER_IMPL_H_ | 5 #ifndef CHROME_BROWSER_UI_AUTOFILL_SAVE_CARD_BUBBLE_CONTROLLER_IMPL_H_ |
| 6 #define CHROME_BROWSER_UI_AUTOFILL_SAVE_CARD_BUBBLE_CONTROLLER_IMPL_H_ | 6 #define CHROME_BROWSER_UI_AUTOFILL_SAVE_CARD_BUBBLE_CONTROLLER_IMPL_H_ |
| 7 | 7 |
| 8 #include <memory> | 8 #include <memory> |
| 9 | 9 |
| 10 #include "base/macros.h" | 10 #include "base/macros.h" |
| (...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 59 | 59 |
| 60 protected: | 60 protected: |
| 61 explicit SaveCardBubbleControllerImpl(content::WebContents* web_contents); | 61 explicit SaveCardBubbleControllerImpl(content::WebContents* web_contents); |
| 62 ~SaveCardBubbleControllerImpl() override; | 62 ~SaveCardBubbleControllerImpl() override; |
| 63 | 63 |
| 64 // Returns the time elapsed since |timer_| was initialized. | 64 // Returns the time elapsed since |timer_| was initialized. |
| 65 // Exists for testing. | 65 // Exists for testing. |
| 66 virtual base::TimeDelta Elapsed() const; | 66 virtual base::TimeDelta Elapsed() const; |
| 67 | 67 |
| 68 // content::WebContentsObserver: | 68 // content::WebContentsObserver: |
| 69 void DidNavigateMainFrame( | 69 void DidFinishNavigation( |
| 70 const content::LoadCommittedDetails& details, | 70 content::NavigationHandle* navigation_handle) override; |
| 71 const content::FrameNavigateParams& params) override; | |
| 72 | 71 |
| 73 private: | 72 private: |
| 74 friend class content::WebContentsUserData<SaveCardBubbleControllerImpl>; | 73 friend class content::WebContentsUserData<SaveCardBubbleControllerImpl>; |
| 75 | 74 |
| 76 void ShowBubble(); | 75 void ShowBubble(); |
| 77 | 76 |
| 78 // Update the visibility and toggled state of the Omnibox save card icon. | 77 // Update the visibility and toggled state of the Omnibox save card icon. |
| 79 void UpdateIcon(); | 78 void UpdateIcon(); |
| 80 | 79 |
| 81 void OpenUrl(const GURL& url); | 80 void OpenUrl(const GURL& url); |
| (...skipping 21 matching lines...) Expand all Loading... |
| 103 // Used to measure the amount of time on a page; if it's less than some | 102 // Used to measure the amount of time on a page; if it's less than some |
| 104 // reasonable limit, then don't close the bubble upon navigation. | 103 // reasonable limit, then don't close the bubble upon navigation. |
| 105 std::unique_ptr<base::ElapsedTimer> timer_; | 104 std::unique_ptr<base::ElapsedTimer> timer_; |
| 106 | 105 |
| 107 DISALLOW_COPY_AND_ASSIGN(SaveCardBubbleControllerImpl); | 106 DISALLOW_COPY_AND_ASSIGN(SaveCardBubbleControllerImpl); |
| 108 }; | 107 }; |
| 109 | 108 |
| 110 } // namespace autofill | 109 } // namespace autofill |
| 111 | 110 |
| 112 #endif // CHROME_BROWSER_UI_AUTOFILL_SAVE_CARD_BUBBLE_CONTROLLER_IMPL_H_ | 111 #endif // CHROME_BROWSER_UI_AUTOFILL_SAVE_CARD_BUBBLE_CONTROLLER_IMPL_H_ |
| OLD | NEW |