| OLD | NEW | 
|---|
| 1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2006-2008 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 12 matching lines...) Expand all  Loading... | 
| 23   MainDllLoader(); | 23   MainDllLoader(); | 
| 24   virtual ~MainDllLoader(); | 24   virtual ~MainDllLoader(); | 
| 25 | 25 | 
| 26   // Loads and calls the entry point of chrome.dll. |instance| is the exe | 26   // Loads and calls the entry point of chrome.dll. |instance| is the exe | 
| 27   // instance retrieved from wWinMain and the |sbox_info| is the broker or | 27   // instance retrieved from wWinMain and the |sbox_info| is the broker or | 
| 28   // target services interface pointer. | 28   // target services interface pointer. | 
| 29   // The return value is what the main entry point of chrome.dll returns | 29   // The return value is what the main entry point of chrome.dll returns | 
| 30   // upon termination. | 30   // upon termination. | 
| 31   int Launch(HINSTANCE instance, sandbox::SandboxInterfaceInfo* sbox_info); | 31   int Launch(HINSTANCE instance, sandbox::SandboxInterfaceInfo* sbox_info); | 
| 32 | 32 | 
|  | 33   // Launches a new instance of the browser if the current instance in | 
|  | 34   // persistent mode an upgrade is detected. | 
|  | 35   void RelaunchChromeBrowserWithNewCommandLineIfNeeded(); | 
|  | 36 | 
| 33   // Derived classes must return the relative registry path that holds the | 37   // Derived classes must return the relative registry path that holds the | 
| 34   // most current version of chrome.dll. | 38   // most current version of chrome.dll. | 
| 35   virtual std::wstring GetRegistryPath() = 0; | 39   virtual std::wstring GetRegistryPath() = 0; | 
| 36 | 40 | 
| 37   // Called after chrome.dll has been loaded but before the entry point | 41   // Called after chrome.dll has been loaded but before the entry point | 
| 38   // is invoked. Derived classes can implement custom actions here. | 42   // is invoked. Derived classes can implement custom actions here. | 
| 39   virtual void OnBeforeLaunch(const std::wstring& version) {} | 43   virtual void OnBeforeLaunch(const std::wstring& version) {} | 
| 40 | 44 | 
| 41   // Called after the chrome.dll entry point returns and before terminating | 45   // Called after the chrome.dll entry point returns and before terminating | 
| 42   // this process. The return value will be used as the process return code. | 46   // this process. The return value will be used as the process return code. | 
| 43   virtual int OnBeforeExit(int return_code) { return return_code; } | 47   virtual int OnBeforeExit(int return_code) { return return_code; } | 
| 44 | 48 | 
| 45  protected: | 49  protected: | 
| 46   HMODULE Load(std::wstring* version, std::wstring* file); | 50   HMODULE Load(std::wstring* version, std::wstring* file); | 
| 47 | 51 | 
| 48  private: | 52  private: | 
| 49   // Chrome.dll handle. | 53   // Chrome.dll handle. | 
| 50   HMODULE dll_; | 54   HMODULE dll_; | 
| 51 }; | 55 }; | 
| 52 | 56 | 
| 53 // Factory for the MainDllLoader. Caller owns the pointer and should call | 57 // Factory for the MainDllLoader. Caller owns the pointer and should call | 
| 54 // delete to free it. | 58 // delete to free it. | 
| 55 MainDllLoader* MakeMainDllLoader(); | 59 MainDllLoader* MakeMainDllLoader(); | 
| 56 | 60 | 
| 57 #endif  // CHROME_APP_CLIENT_UTIL_H_ | 61 #endif  // CHROME_APP_CLIENT_UTIL_H_ | 
| OLD | NEW | 
|---|