summaryrefslogtreecommitdiffstats
path: root/chrome/browser/shell_integration.cc
Commit message (Collapse)AuthorAgeFilesLines
* Infrastructure to improve app mode stub <-> Chrome main communication.jeremy@chromium.org2012-03-071-0/+17
| | | | | | | | | | | | | | | We currently modify the command line to communicate from the launcher to ChromeMain(), this seems like a bad idea in the long run. The aim of this CL is to provide infrastructure to help us going forward. * Add an IsRunningInAppMode() function we an use to determine that we're using app mode rather than having each callsite check the command line. * Mac: Add a function to allow access to the ChromeAppModeInfo struct from anywhere in the code, so we don't need to plumb it down to individual callsites. TEST=Covered by existing tests. BUG=None Review URL: http://codereview.chromium.org/9618021 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@125302 0039d316-1c4b-4281-b951-d872f2087c98
* Platform apps shortcuts use their own browser processbenwells@chromium.org2012-03-011-2/+42
| | | | | | | | | | | | | | | | | | Shortcuts for platform apps, created via the right click menu on the NTP, or when installing applications from the web store, will now add the --user-data-dir flag to run with their own profile, and the --load-extension flag to locate the extension. Also included in this change, loading unpacked extensions will no longer create shortcuts. BUG=None TEST=Tested manually Review URL: http://codereview.chromium.org/9493001 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@124370 0039d316-1c4b-4281-b951-d872f2087c98
* Move BrowserThread to content namespace.joi@chromium.org2011-11-021-0/+2
| | | | | | | | | TBR=owners BUG=98716 Review URL: http://codereview.chromium.org/8437002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@108270 0039d316-1c4b-4281-b951-d872f2087c98
* Change NewRunnableMethod to base::Bind in shell_integration.ccbenwells@chromium.org2011-11-011-8/+9
| | | | | | | | | | BUG=None TEST=Manual testing performed. Review URL: http://codereview.chromium.org/8335004 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@108051 0039d316-1c4b-4281-b951-d872f2087c98
* Split BrowserThread into public API and private implementation, step 1.joi@chromium.org2011-10-281-1/+1
| | | | | | | | | | | | | | | | | | | | | Only content/ now has the ability to create BrowserThread objects, with the exception that tests can create the content::TestBrowserThread subclass, and (temporarily) code in chrome/ can create the DeprecatedBrowserThread subclass. A follow-up change will make content/ take care of its own thread creation, remove DeprecatedBrowserThread, and move all state and non-trivial constructors from BrowserThread down to BrowserThreadImpl. Also moved BrowserProcessSubThread into content/ namespace. As part of follow-up cleanup, chrome/ will stop using this class. BUG=98716 TEST=existing Review URL: http://codereview.chromium.org/8392042 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@107718 0039d316-1c4b-4281-b951-d872f2087c98
* Handle OS registration failure when registering protocol handlersbenwells@chromium.org2011-07-221-0/+6
| | | | | | | | | | | | | | With this change, OS registration failure is noticed and the handler is removed. (A subsequent change will change what happens when OS registration fails here or is noticed at startup). BUG=89691, 88198 TEST=Automated tests added Review URL: http://codereview.chromium.org/7434002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@93598 0039d316-1c4b-4281-b951-d872f2087c98
* Canary versions no longer always remove protocol handlers at startup.benwells@chromium.org2011-07-181-2/+1
| | | | | | | | | | | | | Canary versions no longer check OS registration at startup as they cannot make themselves the default OS handler. BUG=88196 TEST=Manual Review URL: http://codereview.chromium.org/7388009 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@92825 0039d316-1c4b-4281-b951-d872f2087c98
* Moved CanSetAsDefault* from platform_util to shell_integrationbenwells@chromium.org2011-07-151-0/+7
| | | | | | | | | | | | | | Moved the CanSetAsDefaultBrowser / ProtocolClient functions next to the routines which do the setting of Chrome to be the default browser and client. BUG=88196 TEST=Manual testing performed Review URL: http://codereview.chromium.org/7334003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@92659 0039d316-1c4b-4281-b951-d872f2087c98
* Fix memory leak in unit tests for ProtocolHandlerRegistry introduced by ↵willchan@chromium.org2011-05-311-0/+1
| | | | | | | | | | | | | observers. Unit tests need to call Finalize at teardown. This has an additional change to http://codereview.chromium.org/7080023/. BUG=83556 Review URL: http://codereview.chromium.org/7050035 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@87305 0039d316-1c4b-4281-b951-d872f2087c98
* Revert 87296 - Check for OS unregistered protocol handlers at startupwillchan@chromium.org2011-05-311-1/+0
| | | | | | | | | | | | | | | | | | | | | | | | At startup, for all registered protocol handlers check that they are still registered at the operating system level. If they are not, it means that something else has become registered so we should clear our handler. This will make links to the protocol go to the external handler. The check to find out what then OS state of a handler involves an observer and a worker. These classes have been updated to allow one observer to multiple workers and know what protocol is being checked. This is simpler at a code level than having multiple observers. BUG=83556 TEST=Manual testing Review URL: http://codereview.chromium.org/7080023 TBR=willchan@chromium.org Review URL: http://codereview.chromium.org/6975044 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@87301 0039d316-1c4b-4281-b951-d872f2087c98
* Check for OS unregistered protocol handlers at startupwillchan@chromium.org2011-05-311-0/+1
| | | | | | | | | | | | | | | | | | | | | At startup, for all registered protocol handlers check that they are still registered at the operating system level. If they are not, it means that something else has become registered so we should clear our handler. This will make links to the protocol go to the external handler. The check to find out what then OS state of a handler involves an observer and a worker. These classes have been updated to allow one observer to multiple workers and know what protocol is being checked. This is simpler at a code level than having multiple observers. BUG=83556 TEST=Manual testing Review URL: http://codereview.chromium.org/7080023 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@87296 0039d316-1c4b-4281-b951-d872f2087c98
* Allow chrome to become the os default handler for arbitrary protocols on ↵koz@chromium.org2011-05-261-35/+80
| | | | | | | | | | | | | | | mac/win. Note this is unused currently, but will be hooked up to navigator.registerProtocolHandler in a subsequent change. BUG=83556 TEST=Manual Review URL: http://codereview.chromium.org/6961013 Patch from Ben Wells <benwells@chromium.org>. git-svn-id: svn://svn.chromium.org/chrome/trunk/src@86793 0039d316-1c4b-4281-b951-d872f2087c98
* Refactor GetCommandLineArgumentsCommon to not use strings.evan@chromium.org2011-03-081-28/+13
| | | | | | | | | | | | | | | | | Passing around command lines as strings is dangerous, because a given command line is interpretable only with respect to a given parser. This changes a function to instead pass a CommandLine object for carrying the arguments around, and relies on the callers to stringify that as necessary. It turns out that the Linux desktop file format has a well-defined syntax that is different than the syntax we were using. BUG=69467 Review URL: http://codereview.chromium.org/6624072 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@77338 0039d316-1c4b-4281-b951-d872f2087c98
* Extension ids are ASCII.evan@chromium.org2011-03-041-2/+2
| | | | | | | | This is preliminary cleanup for a larger change. Review URL: http://codereview.chromium.org/6613032 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@76941 0039d316-1c4b-4281-b951-d872f2087c98
* Update a bunch of files to the new location of browser_thread.h jam@chromium.org2011-03-011-1/+1
| | | | | | | TBR=avi Review URL: http://codereview.chromium.org/6591066 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@76390 0039d316-1c4b-4281-b951-d872f2087c98
* Introduced a new policy DefaultBrowserSettingEnabled.pastarmovj@chromium.org2011-02-011-1/+3
| | | | | | | | | | | | | | When set it either enforces Chrome's registration as default browser, or prevents the user from seeing the reminder about Chrome not being default as well as disabled the UI for setting it as default browser. When not set the old behavior is observed. BUG=65290 TEST=Manual. Set the policy and the UI should be disabled. If set to true the browser should become default browser immediately. Review URL: http://codereview.chromium.org/6348021 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@73280 0039d316-1c4b-4281-b951-d872f2087c98
* Set Browser::app_name_ in a reasonable way for extension apps.skerner@chromium.org2011-01-141-1/+2
| | | | | | | | | BUG=67702 TEST=BrowserTest.OpenAppWindowLikeNtp,BrowserTest.AppIdSwitch,manually open a few apps and see that windows taskbar hilights the right window. Review URL: http://codereview.chromium.org/6086004 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@71442 0039d316-1c4b-4281-b951-d872f2087c98
* Add "create Application Shortcut" to the app menu on NTP.skerner@google.com2010-11-301-1/+1
| | | | | | | | | BUG=52451 TEST=Manually create app shortcuts for urls and apps. Review URL: http://codereview.chromium.org/5273004 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@67664 0039d316-1c4b-4281-b951-d872f2087c98
* FBTF: Even more deinlining.erg@google.com2010-10-201-0/+8
| | | | | | | | | BUG=none TEST=compiles Review URL: http://codereview.chromium.org/3879002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@63261 0039d316-1c4b-4281-b951-d872f2087c98
* Rename ChromeThread to BrowserThread Part21:tfarina@chromium.org2010-10-121-1/+1
| | | | | | | | | | | - Include browser_thread.h instead of chrome_thread.h in more 100 files. BUG=56926 TEST=trybots Review URL: http://codereview.chromium.org/3691006 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@62286 0039d316-1c4b-4281-b951-d872f2087c98
* Rename ChromeThread to BrowserThread Part16:tfarina@chromium.org2010-10-111-12/+12
| | | | | | | | | | | - Rename entries starting from shell_integration.cc. More 30 files covered. BUG=56926 TEST=trybots Review URL: http://codereview.chromium.org/3708001 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@62136 0039d316-1c4b-4281-b951-d872f2087c98
* Implement new strategy for default apps. Instead of usingaa@chromium.org2010-10-091-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | the component extension system, simply install them as normal apps the first time Chrome runs. Remove the old style default apps. This also removes support for --disable-apps, which doesn't seem necessary since we already have --disable-extensions. BUG=53972 TEST=Uninstall any installed apps. Remove the "default_apps_installed" and "app_promo_counter" keys from Preferences if they are present. Start Chrome with the --enable-default-apps flag, navigate to chrome://extensions/, and click "update now" in the developer tools. This is to make the updater grab the apps from the store quicker, so that you don't have to wait while testing. Normally Chrome would do this by itself after 5-40 mins. Go to NTP. You should see gmail, calendar, and docs default apps show up along with the promo (the text that says "New! A world of ..."). Refresh the NTP 10 times. The promo should go away on the 10th time. There are other details. To test each of these, remove all installed apps and remove the keys from the preferences to reset the state. * If you close Chrome before getting the default apps. They should still show up the next time Chrome is started (after clicking 'Update now') * Clicking "hide this message" should hide the promo and it shouldn't come back on refresh. * Installing or uninstalling any app should hide the promo, and it shouldn't come back. * If the keys from the preferences are removed, but apps are left installed, the default apps should not be installed when clicking 'update now'. * The default apps should only be installed in locale en-US. Review URL: http://codereview.chromium.org/3522015 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@62084 0039d316-1c4b-4281-b951-d872f2087c98
* Remove usage of GetSwitchValue for most of chrome/browser/.evan@chromium.org2010-08-041-3/+3
| | | | | | Review URL: http://codereview.chromium.org/3005053 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@54856 0039d316-1c4b-4281-b951-d872f2087c98
* enable apps by defaulterikkay@chromium.org2010-08-021-3/+2
| | | | | | | | | BUG=none TEST=run Chrome with no command line flags, apps should be enabled Review URL: http://codereview.chromium.org/3015043 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@54624 0039d316-1c4b-4281-b951-d872f2087c98
* Replace obsolete kProfile switch with kLoginProfilecmasone@google.com2010-08-021-2/+2
| | | | | | | | | BUG=50866 TEST=it compiles Review URL: http://codereview.chromium.org/3013050 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@54539 0039d316-1c4b-4281-b951-d872f2087c98
* base/ header cleanup. Forward declaration instead of including.erg@google.com2010-07-281-0/+1
| | | | | | | | | BUG=none TEST=none Review URL: http://codereview.chromium.org/3068004 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@53969 0039d316-1c4b-4281-b951-d872f2087c98
* Deprecate most of the remaining wstring file_util functions.evan@chromium.org2010-07-081-4/+6
| | | | | | | | | | | | | These still exist on Windows due to being used by the installer, but by moving them into the Windows-only block we prevent them from being used in new code. (I am already finding new code using some of these! I am glad to be rid of them.) BUG=24672 Review URL: http://codereview.chromium.org/2850042 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@51862 0039d316-1c4b-4281-b951-d872f2087c98
* Re-land r47079: Shorten several appsrelated flags.aa@chromium.org2010-05-131-3/+2
| | | | | | TBR=rafaelw@chromium.org git-svn-id: svn://svn.chromium.org/chrome/trunk/src@47104 0039d316-1c4b-4281-b951-d872f2087c98
* Revert 47079 - Shorten several appsrelated flags. "256 characters should be ↵aa@chromium.org2010-05-121-2/+3
| | | | | | | | | | | enough for anyone's shortcut flags!" Review URL: http://codereview.chromium.org/1991009 TBR=aa@chromium.org Review URL: http://codereview.chromium.org/2010013 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@47081 0039d316-1c4b-4281-b951-d872f2087c98
* Shorten several apps-related flags. "256 characters should be enough for ↵aa@chromium.org2010-05-121-3/+2
| | | | | | | | anyone's shortcut flags!" Review URL: http://codereview.chromium.org/1991009 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@47079 0039d316-1c4b-4281-b951-d872f2087c98
* chrome 6: string_util.h -> utf_string_conversions.h fix.jhawkins@chromium.org2010-03-081-1/+2
| | | | | | | | BUG=none TEST=none Review URL: http://codereview.chromium.org/671025 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@40964 0039d316-1c4b-4281-b951-d872f2087c98
* Implement launch disposition for extension-apps.rafaelw@chromium.org2010-02-051-0/+54
| | | | | | | | | | | | This change adds an --app-id command switch that signifies that the extension-app with the given id should be launched according to its configuration. It also adds parsing for app.window_type in the manifest and the behavior that when installed and a desktop shortcut is created, the --app-id switch is used rather than the --app switch. BUG=32361 Review URL: http://codereview.chromium.org/573016 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@38184 0039d316-1c4b-4281-b951-d872f2087c98
* Fifth patch in getting rid of caching MessageLoop pointers.jam@chromium.org2009-11-031-18/+22
| | | | | | | BUG=25354 Review URL: http://codereview.chromium.org/345037 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@30790 0039d316-1c4b-4281-b951-d872f2087c98
* Allow the default browser check to return "unknown" and reflect that in the UI.mdm@chromium.org2009-09-041-8/+19
| | | | | | | | | | On Linux this can happen for unsupported desktop environments. On Windows and Mac OS X this probably should not occur and likely indicates some sort of serious configuration error. This change avoids repeatedly bothering the user to set the default browser in cases where we're likely to fail at that, without incorrectly displaying that we are the default browser. BUG=none TEST=none Review URL: http://codereview.chromium.org/200025 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@25553 0039d316-1c4b-4281-b951-d872f2087c98
* First step to create application shortcuts on Linux.phajdan.jr@chromium.org2009-08-121-0/+2
| | | | | | | | | | | Create a working desktop shortcut. For now it displays no UI, but the backend works. TEST=none http://crbug.com/17251 Review URL: http://codereview.chromium.org/164280 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@23226 0039d316-1c4b-4281-b951-d872f2087c98
* Fix running default browser check/setting in UI thread on Linux.mattm@chromium.org2009-07-281-135/+57
| | | | | | | | | | | | Rename shell_integration.cc to shell_integration_win.cc, so shell_integration.cc can be used for cross-platform stuff. Move DefaultBrowserWorker from GeneralPageView to ShellIntegration. BUG=17179 Review URL: http://codereview.chromium.org/160218 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@21794 0039d316-1c4b-4281-b951-d872f2087c98
* Allow two user level installs of Chrome to have default browser settings.kuchhal@chromium.org2009-07-231-13/+15
| | | | | | | | | | | | | | | | | | | | | | This change will allow two Windows users to install thier own copy of Chrome and set it as default browser. There is a bunch of refactoring in this change. - Divided the registry entries into three categories: * Entries that are only read from HKLM * Entries that actually tie file/protocol associations to Chrome. This will almost always be in HKCU (except when it is a OEM install). * Entries that we can create in HKCU if we fail to create them in HKLM. - For single user machine nothing should change. - For two users on the same machine (each with a different user level Chrome installed), the second user's default browser will get renamed to Chromium.<user> and the required registry entries will also be renamed so that they do not overwrite first users's registry entries. BUG=3641 TEST=Install and set Chromium as default browser from two different logins on the same machine for various combinations of XP/Vista, admin users/non admin user, user-level install/system-level install. Review URL: http://codereview.chromium.org/159172 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@21428 0039d316-1c4b-4281-b951-d872f2087c98
* Make default browser path check case insensitive.kuchhal@chromium.org2009-07-061-1/+5
| | | | | | | | BUG=15449 Review URL: http://codereview.chromium.org/149136 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@19976 0039d316-1c4b-4281-b951-d872f2087c98
* Move win_util.h from common to app.ben@chromium.org2009-05-081-3/+3
| | | | | | | | http://crbug.com/11387 Review URL: http://codereview.chromium.org/113169 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@15694 0039d316-1c4b-4281-b951-d872f2087c98
* NO CODE CHANGEdeanm@chromium.org2009-03-101-1/+0
| | | | | | | | | Normalize end of file newlines in chrome/. All files end in a single newline. Review URL: http://codereview.chromium.org/42015 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@11331 0039d316-1c4b-4281-b951-d872f2087c98
* Fix all places where we used the GetWinVersion functionnsylvain@chromium.org2009-02-251-2/+2
| | | | | | | | | incorrectly. bug:7802 Review URL: http://codereview.chromium.org/28128 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@10366 0039d316-1c4b-4281-b951-d872f2087c98
* Fix regression caused by CommandLine change.kuchhal@chromium.org2009-01-271-1/+2
| | | | | | | | | BUG=6863 Review URL: http://codereview.chromium.org/19001 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@8696 0039d316-1c4b-4281-b951-d872f2087c98
* Move creation of 'open with' registry keys to installer. We should place ↵kuchhal@chromium.org2008-11-191-83/+1
| | | | | | | | | | nice and not create these keys on every Chrome start just in case user wants a customized open with list. So now we only create these keys at installation or when user choses to make Chrome default browser. Also we clean them up on uninstall. BUG=1190855 Review URL: http://codereview.chromium.org/11491 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@5726 0039d316-1c4b-4281-b951-d872f2087c98
* Temporary code to upgrade Chrome open command for existing users.kuchhal@chromium.org2008-11-051-1/+1
| | | | | | | | From 'chrome %1' to 'chrome -- %1'. For more information see r4016 and crbug.com/3808 Review URL: http://codereview.chromium.org/8988 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@4713 0039d316-1c4b-4281-b951-d872f2087c98
* * Update comments from code review feedback.kuchhal@chromium.org2008-10-271-1/+0
| | | | git-svn-id: svn://svn.chromium.org/chrome/trunk/src@4006 0039d316-1c4b-4281-b951-d872f2087c98
* Add a command line option to installer that will let user set Chrome askuchhal@chromium.org2008-10-241-99/+10
| | | | | | default browser. git-svn-id: svn://svn.chromium.org/chrome/trunk/src@3961 0039d316-1c4b-4281-b951-d872f2087c98
* Use a more compact license header in source files.license.bot2008-08-241-28/+4
| | | | git-svn-id: svn://svn.chromium.org/chrome/trunk/src@1287 0039d316-1c4b-4281-b951-d872f2087c98
* First set of changes to start separating Google specific branding from ↵rahulk@google.com2008-08-181-2/+5
| | | | | | | | | | | | | Chromium. This change mostly tries to modify installer to install Chromium or Google Chrome depending on a compile flag. The goal is to try to isolate all the differences in a single class that can be overridden for customization. There is also a lot of refactoring to make this happen. Some changes are yet to be done but I didn't want to make this change even bigger than it already is. With all these changes the default build should still work as it is (Google Chrome should get installed/uninstalled). The changes yet to be done: - Separating string resources (this is marked by TODO in one of the files) - Generate different chrome.7z (Chromium will not include rlz.dll) for mini_installer BUG=1296800 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@999 0039d316-1c4b-4281-b951-d872f2087c98
* Add chrome to the repository.initial.commit2008-07-261-0/+342
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@15 0039d316-1c4b-4281-b951-d872f2087c98