OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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/macros.h" | 5 #include "base/macros.h" |
6 #include "base/memory/scoped_ptr.h" | 6 #include "base/memory/scoped_ptr.h" |
7 #include "chrome/browser/browser_process.h" | 7 #include "chrome/browser/browser_process.h" |
8 #include "chrome/browser/ui/browser.h" | 8 #include "chrome/browser/ui/browser.h" |
9 #include "chrome/browser/ui/browser_tabstrip.h" | 9 #include "chrome/browser/ui/browser_tabstrip.h" |
10 #include "chrome/browser/ui/tabs/tab_strip_model.h" | 10 #include "chrome/browser/ui/tabs/tab_strip_model.h" |
(...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
91 ContentAutofillDriverFactory::CreateForWebContentsAndDelegate( | 91 ContentAutofillDriverFactory::CreateForWebContentsAndDelegate( |
92 web_contents, &autofill_client_, "en-US", | 92 web_contents, &autofill_client_, "en-US", |
93 AutofillManager::DISABLE_AUTOFILL_DOWNLOAD_MANAGER); | 93 AutofillManager::DISABLE_AUTOFILL_DOWNLOAD_MANAGER); |
94 } | 94 } |
95 | 95 |
96 void WasHidden() override { | 96 void WasHidden() override { |
97 if (!web_contents_hidden_callback_.is_null()) | 97 if (!web_contents_hidden_callback_.is_null()) |
98 web_contents_hidden_callback_.Run(); | 98 web_contents_hidden_callback_.Run(); |
99 } | 99 } |
100 | 100 |
101 void NavigationEntryCommitted( | 101 void DidFinishNavigation( |
102 const content::LoadCommittedDetails& load_details) override { | 102 content::NavigationHandle* navigation_handle) override { |
103 if (!nav_entry_committed_callback_.is_null()) | 103 if (!nav_entry_committed_callback_.is_null()) |
104 nav_entry_committed_callback_.Run(); | 104 nav_entry_committed_callback_.Run(); |
105 } | 105 } |
106 | 106 |
107 protected: | 107 protected: |
108 base::Closure web_contents_hidden_callback_; | 108 base::Closure web_contents_hidden_callback_; |
109 base::Closure nav_entry_committed_callback_; | 109 base::Closure nav_entry_committed_callback_; |
110 | 110 |
111 testing::NiceMock<MockAutofillClient> autofill_client_; | 111 testing::NiceMock<MockAutofillClient> autofill_client_; |
112 }; | 112 }; |
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
144 browser()->OpenURL(content::OpenURLParams(GURL(chrome::kChromeUIAboutURL), | 144 browser()->OpenURL(content::OpenURLParams(GURL(chrome::kChromeUIAboutURL), |
145 content::Referrer(), | 145 content::Referrer(), |
146 CURRENT_TAB, | 146 CURRENT_TAB, |
147 ui::PAGE_TRANSITION_TYPED, | 147 ui::PAGE_TRANSITION_TYPED, |
148 false)); | 148 false)); |
149 runner->Run(); | 149 runner->Run(); |
150 nav_entry_committed_callback_.Reset(); | 150 nav_entry_committed_callback_.Reset(); |
151 } | 151 } |
152 | 152 |
153 } // namespace autofill | 153 } // namespace autofill |
OLD | NEW |