[M85 Dev][EFL] Fix errors to generate ninja files
[platform/framework/web/chromium-efl.git] / chrome / browser / chrome_browser_main_win.h
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
3 // found in the LICENSE file.
4
5 // Contains functions used by BrowserMain() that are win32-specific.
6
7 #ifndef CHROME_BROWSER_CHROME_BROWSER_MAIN_WIN_H_
8 #define CHROME_BROWSER_CHROME_BROWSER_MAIN_WIN_H_
9
10 #include <memory>
11
12 #include "base/files/file_path_watcher.h"
13 #include "base/macros.h"
14 #include "chrome/browser/chrome_browser_main.h"
15
16 class ModuleWatcher;
17
18 namespace base {
19 class CommandLine;
20 }
21
22 // Handle uninstallation when given the appropriate the command-line switch.
23 // If |chrome_still_running| is true a modal dialog will be shown asking the
24 // user to close the other chrome instance.
25 int DoUninstallTasks(bool chrome_still_running);
26
27 class ChromeBrowserMainPartsWin : public ChromeBrowserMainParts {
28  public:
29   ChromeBrowserMainPartsWin(const content::MainFunctionParams& parameters,
30                             StartupData* startup_data);
31
32   ~ChromeBrowserMainPartsWin() override;
33
34   // BrowserParts overrides.
35   void ToolkitInitialized() override;
36   void PreMainMessageLoopStart() override;
37   int PreCreateThreads() override;
38   void PostMainMessageLoopRun() override;
39
40   // ChromeBrowserMainParts overrides.
41   void ShowMissingLocaleMessageBox() override;
42   void PostProfileInit() override;
43   void PostBrowserStart() override;
44
45   // Prepares the localized strings that are going to be displayed to
46   // the user if the browser process dies. These strings are stored in the
47   // environment block so they are accessible in the early stages of the
48   // chrome executable's lifetime.
49   static void PrepareRestartOnCrashEnviroment(
50       const base::CommandLine& parsed_command_line);
51
52   // Registers Chrome with the Windows Restart Manager, which will restore the
53   // Chrome session when the computer is restarted after a system update.
54   static void RegisterApplicationRestart(
55       const base::CommandLine& parsed_command_line);
56
57   // This method handles the --hide-icons and --show-icons command line options
58   // for chrome that get triggered by Windows from registry entries
59   // HideIconsCommand & ShowIconsCommand. Chrome doesn't support hide icons
60   // functionality so we just ask the users if they want to uninstall Chrome.
61   static int HandleIconsCommands(const base::CommandLine& parsed_command_line);
62
63   // Checks if there is any machine level Chrome installed on the current
64   // machine. If yes and the current Chrome process is user level, uninstalls
65   // the user-level Chrome and susbsequently auto-launches the system-level
66   // Chrome. Returns true if the uninstall was kicked off and this process
67   // should exit.
68   static bool CheckMachineLevelInstall();
69
70   // Sets the TranslationDelegate which provides localized strings to
71   // installer_util.
72   static void SetupInstallerUtilStrings();
73
74  private:
75   // Watches module load events and forwards them to the ModuleDatabase.
76   std::unique_ptr<ModuleWatcher> module_watcher_;
77
78   DISALLOW_COPY_AND_ASSIGN(ChromeBrowserMainPartsWin);
79 };
80
81 #endif  // CHROME_BROWSER_CHROME_BROWSER_MAIN_WIN_H_