| OLD | NEW |
| (Empty) |
| 1 // Copyright (c) 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 #ifndef CHROME_TEST_CHROMEDRIVER_CHROME_DESKTOP_IMPL_H_ | |
| 6 #define CHROME_TEST_CHROMEDRIVER_CHROME_DESKTOP_IMPL_H_ | |
| 7 | |
| 8 #include <string> | |
| 9 | |
| 10 #include "base/compiler_specific.h" | |
| 11 #include "base/files/file_path.h" | |
| 12 #include "base/files/scoped_temp_dir.h" | |
| 13 #include "base/process.h" | |
| 14 #include "chrome/test/chromedriver/chrome_impl.h" | |
| 15 #include "chrome/test/chromedriver/net/sync_websocket_factory.h" | |
| 16 | |
| 17 class CommandLine; | |
| 18 class Status; | |
| 19 class URLRequestContextGetter; | |
| 20 | |
| 21 namespace base { | |
| 22 class DictionaryValue; | |
| 23 class FilePath; | |
| 24 class ListValue; | |
| 25 } | |
| 26 | |
| 27 class ChromeDesktopImpl : public ChromeImpl { | |
| 28 public: | |
| 29 ChromeDesktopImpl(URLRequestContextGetter* context_getter, | |
| 30 int port, | |
| 31 const SyncWebSocketFactory& socket_factory); | |
| 32 virtual ~ChromeDesktopImpl(); | |
| 33 | |
| 34 virtual Status Launch(const base::FilePath& exe, | |
| 35 const base::ListValue* args, | |
| 36 const base::ListValue* extensions, | |
| 37 const base::DictionaryValue* prefs, | |
| 38 const base::DictionaryValue* local_state); | |
| 39 | |
| 40 // Overriden from Chrome: | |
| 41 virtual std::string GetOperatingSystemName() OVERRIDE; | |
| 42 | |
| 43 // Overridden from ChromeImpl: | |
| 44 virtual Status Quit() OVERRIDE; | |
| 45 | |
| 46 private: | |
| 47 base::ProcessHandle process_; | |
| 48 base::ScopedTempDir user_data_dir_; | |
| 49 base::ScopedTempDir extension_dir_; | |
| 50 }; | |
| 51 | |
| 52 namespace internal { | |
| 53 Status ProcessCommandLineArgs(const base::ListValue* args, | |
| 54 CommandLine* command); | |
| 55 Status ProcessExtensions(const base::ListValue* extensions, | |
| 56 const base::FilePath& temp_dir, | |
| 57 CommandLine* command); | |
| 58 Status PrepareUserDataDir( | |
| 59 const base::FilePath& user_data_dir, | |
| 60 const base::DictionaryValue* custom_prefs, | |
| 61 const base::DictionaryValue* custom_local_state); | |
| 62 } // namespace internal | |
| 63 | |
| 64 #endif // CHROME_TEST_CHROMEDRIVER_CHROME_DESKTOP_IMPL_H_ | |
| OLD | NEW |