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 3 // found in the LICENSE file. 4 5 #include "components/autofill/core/browser/test_autofill_driver.h" 6 7 #include "base/test/sequenced_worker_pool_owner.h" 8 #include "base/threading/sequenced_worker_pool.h" 9 10 namespace autofill { 11 TestAutofillDriver()12TestAutofillDriver::TestAutofillDriver() 13 : blocking_pool_owner_( 14 new base::SequencedWorkerPoolOwner(4, "TestAutofillDriver")), 15 url_request_context_(NULL) {} 16 ~TestAutofillDriver()17TestAutofillDriver::~TestAutofillDriver() { 18 blocking_pool_owner_->pool()->Shutdown(); 19 } 20 IsOffTheRecord() const21bool TestAutofillDriver::IsOffTheRecord() const { 22 return false; 23 } 24 GetURLRequestContext()25net::URLRequestContextGetter* TestAutofillDriver::GetURLRequestContext() { 26 return url_request_context_; 27 } 28 GetBlockingPool()29base::SequencedWorkerPool* TestAutofillDriver::GetBlockingPool() { 30 return blocking_pool_owner_->pool().get(); 31 } 32 RendererIsAvailable()33bool TestAutofillDriver::RendererIsAvailable() { 34 return true; 35 } 36 SendFormDataToRenderer(int query_id,RendererFormDataAction action,const FormData & form_data)37void TestAutofillDriver::SendFormDataToRenderer(int query_id, 38 RendererFormDataAction action, 39 const FormData& form_data) { 40 } 41 PingRenderer()42void TestAutofillDriver::PingRenderer() {} 43 SendAutofillTypePredictionsToRenderer(const std::vector<FormStructure * > & forms)44void TestAutofillDriver::SendAutofillTypePredictionsToRenderer( 45 const std::vector<FormStructure*>& forms) { 46 } 47 RendererShouldAcceptDataListSuggestion(const base::string16 & value)48void TestAutofillDriver::RendererShouldAcceptDataListSuggestion( 49 const base::string16& value) { 50 } 51 RendererShouldClearFilledForm()52void TestAutofillDriver::RendererShouldClearFilledForm() { 53 } 54 RendererShouldClearPreviewedForm()55void TestAutofillDriver::RendererShouldClearPreviewedForm() { 56 } 57 SetURLRequestContext(net::URLRequestContextGetter * url_request_context)58void TestAutofillDriver::SetURLRequestContext( 59 net::URLRequestContextGetter* url_request_context) { 60 url_request_context_ = url_request_context; 61 } 62 RendererShouldFillFieldWithValue(const base::string16 & value)63void TestAutofillDriver::RendererShouldFillFieldWithValue( 64 const base::string16& value) { 65 } 66 RendererShouldPreviewFieldWithValue(const base::string16 & value)67void TestAutofillDriver::RendererShouldPreviewFieldWithValue( 68 const base::string16& value) { 69 } 70 71 } // namespace autofill 72