Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(375)

Side by Side Diff: chrome/browser/chrome_browser_main_win.h

Issue 196413016: Move CommandLine to base namespace. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « chrome/browser/chrome_browser_main.h ('k') | chrome/browser/chrome_content_browser_client.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 "chrome/browser/chrome_browser_main.h" 10 #include "chrome/browser/chrome_browser_main.h"
11 11
12 namespace base {
12 class CommandLine; 13 class CommandLine;
14 }
13 15
14 // Handle uninstallation when given the appropriate the command-line switch. 16 // Handle uninstallation when given the appropriate the command-line switch.
15 // If |chrome_still_running| is true a modal dialog will be shown asking the 17 // If |chrome_still_running| is true a modal dialog will be shown asking the
16 // user to close the other chrome instance. 18 // user to close the other chrome instance.
17 int DoUninstallTasks(bool chrome_still_running); 19 int DoUninstallTasks(bool chrome_still_running);
18 20
19 class ChromeBrowserMainPartsWin : public ChromeBrowserMainParts { 21 class ChromeBrowserMainPartsWin : public ChromeBrowserMainParts {
20 public: 22 public:
21 explicit ChromeBrowserMainPartsWin( 23 explicit ChromeBrowserMainPartsWin(
22 const content::MainFunctionParams& parameters); 24 const content::MainFunctionParams& parameters);
23 25
24 virtual ~ChromeBrowserMainPartsWin(); 26 virtual ~ChromeBrowserMainPartsWin();
25 27
26 // BrowserParts overrides. 28 // BrowserParts overrides.
27 virtual void ToolkitInitialized() OVERRIDE; 29 virtual void ToolkitInitialized() OVERRIDE;
28 virtual void PreMainMessageLoopStart() OVERRIDE; 30 virtual void PreMainMessageLoopStart() OVERRIDE;
29 virtual int PreCreateThreads() OVERRIDE; 31 virtual int PreCreateThreads() OVERRIDE;
30 32
31 // ChromeBrowserMainParts overrides. 33 // ChromeBrowserMainParts overrides.
32 virtual void ShowMissingLocaleMessageBox() OVERRIDE; 34 virtual void ShowMissingLocaleMessageBox() OVERRIDE;
33 virtual void PostBrowserStart() OVERRIDE; 35 virtual void PostBrowserStart() OVERRIDE;
34 36
35 // Prepares the localized strings that are going to be displayed to 37 // Prepares the localized strings that are going to be displayed to
36 // the user if the browser process dies. These strings are stored in the 38 // the user if the browser process dies. These strings are stored in the
37 // environment block so they are accessible in the early stages of the 39 // environment block so they are accessible in the early stages of the
38 // chrome executable's lifetime. 40 // chrome executable's lifetime.
39 static void PrepareRestartOnCrashEnviroment( 41 static void PrepareRestartOnCrashEnviroment(
40 const CommandLine& parsed_command_line); 42 const base::CommandLine& parsed_command_line);
41 43
42 // Registers Chrome with the Windows Restart Manager, which will restore the 44 // Registers Chrome with the Windows Restart Manager, which will restore the
43 // Chrome session when the computer is restarted after a system update. 45 // Chrome session when the computer is restarted after a system update.
44 static void RegisterApplicationRestart( 46 static void RegisterApplicationRestart(
45 const CommandLine& parsed_command_line); 47 const base::CommandLine& parsed_command_line);
46 48
47 // This method handles the --hide-icons and --show-icons command line options 49 // This method handles the --hide-icons and --show-icons command line options
48 // for chrome that get triggered by Windows from registry entries 50 // for chrome that get triggered by Windows from registry entries
49 // HideIconsCommand & ShowIconsCommand. Chrome doesn't support hide icons 51 // HideIconsCommand & ShowIconsCommand. Chrome doesn't support hide icons
50 // functionality so we just ask the users if they want to uninstall Chrome. 52 // functionality so we just ask the users if they want to uninstall Chrome.
51 static int HandleIconsCommands(const CommandLine& parsed_command_line); 53 static int HandleIconsCommands(const base::CommandLine& parsed_command_line);
52 54
53 // Check if there is any machine level Chrome installed on the current 55 // Check if there is any machine level Chrome installed on the current
54 // machine. If yes and the current Chrome process is user level, we do not 56 // machine. If yes and the current Chrome process is user level, we do not
55 // allow the user level Chrome to run. So we notify the user and uninstall 57 // allow the user level Chrome to run. So we notify the user and uninstall
56 // user level Chrome. 58 // user level Chrome.
57 static bool CheckMachineLevelInstall(); 59 static bool CheckMachineLevelInstall();
58 60
59 // Sets the TranslationDelegate which provides localized strings to 61 // Sets the TranslationDelegate which provides localized strings to
60 // installer_util. 62 // installer_util.
61 static void SetupInstallerUtilStrings(); 63 static void SetupInstallerUtilStrings();
62 64
63 private: 65 private:
64 DISALLOW_COPY_AND_ASSIGN(ChromeBrowserMainPartsWin); 66 DISALLOW_COPY_AND_ASSIGN(ChromeBrowserMainPartsWin);
65 }; 67 };
66 68
67 #endif // CHROME_BROWSER_CHROME_BROWSER_MAIN_WIN_H_ 69 #endif // CHROME_BROWSER_CHROME_BROWSER_MAIN_WIN_H_
OLDNEW
« no previous file with comments | « chrome/browser/chrome_browser_main.h ('k') | chrome/browser/chrome_content_browser_client.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698