| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 // This file defines utility functions that can report details about the | 5 // This file defines utility functions that can report details about the |
| 6 // host operating environment. | 6 // host operating environment. |
| 7 | 7 |
| 8 #ifndef CHROME_APP_CLIENT_UTIL_H_ | 8 #ifndef CHROME_APP_CLIENT_UTIL_H_ |
| 9 #define CHROME_APP_CLIENT_UTIL_H_ | 9 #define CHROME_APP_CLIENT_UTIL_H_ |
| 10 | 10 |
| (...skipping 28 matching lines...) Expand all Loading... |
| 39 int Launch(HINSTANCE instance); | 39 int Launch(HINSTANCE instance); |
| 40 | 40 |
| 41 // Launches a new instance of the browser if the current instance in | 41 // Launches a new instance of the browser if the current instance in |
| 42 // persistent mode an upgrade is detected. | 42 // persistent mode an upgrade is detected. |
| 43 void RelaunchChromeBrowserWithNewCommandLineIfNeeded(); | 43 void RelaunchChromeBrowserWithNewCommandLineIfNeeded(); |
| 44 | 44 |
| 45 protected: | 45 protected: |
| 46 // Called after chrome.dll has been loaded but before the entry point | 46 // Called after chrome.dll has been loaded but before the entry point |
| 47 // is invoked. Derived classes can implement custom actions here. | 47 // is invoked. Derived classes can implement custom actions here. |
| 48 // |dll_path| refers to the path of the Chrome dll being loaded. | 48 // |dll_path| refers to the path of the Chrome dll being loaded. |
| 49 virtual void OnBeforeLaunch(const base::string16& dll_path) = 0; | 49 virtual void OnBeforeLaunch(const std::string& process_type, |
| 50 const base::string16& dll_path) = 0; |
| 50 | 51 |
| 51 // Called after the chrome.dll entry point returns and before terminating | 52 // Called after the chrome.dll entry point returns and before terminating |
| 52 // this process. The return value will be used as the process return code. | 53 // this process. The return value will be used as the process return code. |
| 53 // |dll_path| refers to the path of the Chrome dll being loaded. | 54 // |dll_path| refers to the path of the Chrome dll being loaded. |
| 54 virtual int OnBeforeExit(int return_code, const base::string16& dll_path) = 0; | 55 virtual int OnBeforeExit(int return_code, const base::string16& dll_path) = 0; |
| 55 | 56 |
| 56 private: | 57 private: |
| 57 HMODULE Load(base::string16* version, base::string16* out_file); | 58 HMODULE Load(base::string16* version, base::string16* out_file); |
| 58 | 59 |
| 59 private: | 60 private: |
| 60 HMODULE dll_; | 61 HMODULE dll_; |
| 61 std::string process_type_; | 62 std::string process_type_; |
| 62 const bool metro_mode_; | 63 const bool metro_mode_; |
| 63 }; | 64 }; |
| 64 | 65 |
| 65 // Factory for the MainDllLoader. Caller owns the pointer and should call | 66 // Factory for the MainDllLoader. Caller owns the pointer and should call |
| 66 // delete to free it. | 67 // delete to free it. |
| 67 MainDllLoader* MakeMainDllLoader(); | 68 MainDllLoader* MakeMainDllLoader(); |
| 68 | 69 |
| 69 #endif // CHROME_APP_CLIENT_UTIL_H_ | 70 #endif // CHROME_APP_CLIENT_UTIL_H_ |
| OLD | NEW |