| 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 // Contains functions used by BrowserMain() that are win32-specific. | 5 // Contains functions used by BrowserMain() that are win32-specific. |
| 6 | 6 |
| 7 #ifndef CHROME_BROWSER_CHROME_BROWSER_MAIN_WIN_H_ | 7 #ifndef CHROME_BROWSER_CHROME_BROWSER_MAIN_WIN_H_ |
| 8 #define CHROME_BROWSER_CHROME_BROWSER_MAIN_WIN_H_ | 8 #define CHROME_BROWSER_CHROME_BROWSER_MAIN_WIN_H_ |
| 9 | 9 |
| 10 #include "base/memory/scoped_ptr.h" | |
| 11 #include "chrome/browser/chrome_browser_main.h" | 10 #include "chrome/browser/chrome_browser_main.h" |
| 12 | 11 |
| 13 class CommandLine; | 12 class CommandLine; |
| 14 | 13 |
| 15 namespace chrome { | |
| 16 class StorageMonitorWin; | |
| 17 } // namespace chrome | |
| 18 | |
| 19 | |
| 20 // Handle uninstallation when given the appropriate the command-line switch. | 14 // Handle uninstallation when given the appropriate the command-line switch. |
| 21 // If |chrome_still_running| is true a modal dialog will be shown asking the | 15 // If |chrome_still_running| is true a modal dialog will be shown asking the |
| 22 // user to close the other chrome instance. | 16 // user to close the other chrome instance. |
| 23 int DoUninstallTasks(bool chrome_still_running); | 17 int DoUninstallTasks(bool chrome_still_running); |
| 24 | 18 |
| 25 class ChromeBrowserMainPartsWin : public ChromeBrowserMainParts { | 19 class ChromeBrowserMainPartsWin : public ChromeBrowserMainParts { |
| 26 public: | 20 public: |
| 27 explicit ChromeBrowserMainPartsWin( | 21 explicit ChromeBrowserMainPartsWin( |
| 28 const content::MainFunctionParams& parameters); | 22 const content::MainFunctionParams& parameters); |
| 29 | 23 |
| 30 virtual ~ChromeBrowserMainPartsWin(); | 24 virtual ~ChromeBrowserMainPartsWin(); |
| 31 | 25 |
| 32 // BrowserParts overrides. | 26 // BrowserParts overrides. |
| 33 virtual void ToolkitInitialized() OVERRIDE; | 27 virtual void ToolkitInitialized() OVERRIDE; |
| 34 virtual void PreMainMessageLoopStart() OVERRIDE; | 28 virtual void PreMainMessageLoopStart() OVERRIDE; |
| 35 virtual int PreCreateThreads() OVERRIDE; | 29 virtual int PreCreateThreads() OVERRIDE; |
| 36 virtual void PostMainMessageLoopRun() OVERRIDE; | 30 virtual void PostMainMessageLoopRun() OVERRIDE; |
| 37 virtual void PreProfileInit() OVERRIDE; | |
| 38 | 31 |
| 39 // ChromeBrowserMainParts overrides. | 32 // ChromeBrowserMainParts overrides. |
| 40 virtual void ShowMissingLocaleMessageBox() OVERRIDE; | 33 virtual void ShowMissingLocaleMessageBox() OVERRIDE; |
| 41 | 34 |
| 42 // Prepares the localized strings that are going to be displayed to | 35 // Prepares the localized strings that are going to be displayed to |
| 43 // the user if the browser process dies. These strings are stored in the | 36 // the user if the browser process dies. These strings are stored in the |
| 44 // environment block so they are accessible in the early stages of the | 37 // environment block so they are accessible in the early stages of the |
| 45 // chrome executable's lifetime. | 38 // chrome executable's lifetime. |
| 46 static void PrepareRestartOnCrashEnviroment( | 39 static void PrepareRestartOnCrashEnviroment( |
| 47 const CommandLine& parsed_command_line); | 40 const CommandLine& parsed_command_line); |
| (...skipping 13 matching lines...) Expand all Loading... |
| 61 // machine. If yes and the current Chrome process is user level, we do not | 54 // machine. If yes and the current Chrome process is user level, we do not |
| 62 // allow the user level Chrome to run. So we notify the user and uninstall | 55 // allow the user level Chrome to run. So we notify the user and uninstall |
| 63 // user level Chrome. | 56 // user level Chrome. |
| 64 static bool CheckMachineLevelInstall(); | 57 static bool CheckMachineLevelInstall(); |
| 65 | 58 |
| 66 // Sets the TranslationDelegate which provides localized strings to | 59 // Sets the TranslationDelegate which provides localized strings to |
| 67 // installer_util. | 60 // installer_util. |
| 68 static void SetupInstallerUtilStrings(); | 61 static void SetupInstallerUtilStrings(); |
| 69 | 62 |
| 70 private: | 63 private: |
| 71 scoped_ptr<chrome::StorageMonitorWin> storage_monitor_; | |
| 72 | |
| 73 DISALLOW_COPY_AND_ASSIGN(ChromeBrowserMainPartsWin); | 64 DISALLOW_COPY_AND_ASSIGN(ChromeBrowserMainPartsWin); |
| 74 }; | 65 }; |
| 75 | 66 |
| 76 #endif // CHROME_BROWSER_CHROME_BROWSER_MAIN_WIN_H_ | 67 #endif // CHROME_BROWSER_CHROME_BROWSER_MAIN_WIN_H_ |
| OLD | NEW |