summaryrefslogtreecommitdiffstats
path: root/chrome/browser/browser_main_gtk.cc
Commit message (Collapse)AuthorAgeFilesLines
* Rename the Chrome BrowserMainParts implementations to all start with Chrome. ↵jam@chromium.org2011-09-081-190/+0
| | | | | | | | | The classes already got renamed once BrowserMainParts moved to content. This just renames the file names. BUG=90445 Review URL: http://codereview.chromium.org/7841049 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@100269 0039d316-1c4b-4281-b951-d872f2087c98
* Refactor some more BrowserMain code. Move the small bit of remaining code ↵jam@chromium.org2011-09-081-41/+0
| | | | | | | | | that's required by all embedders to content. BUG=90445 Review URL: http://codereview.chromium.org/7840041 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@100223 0039d316-1c4b-4281-b951-d872f2087c98
* Start moving code from BrowserMain to content, so that it can be reused by ↵jam@chromium.org2011-09-071-8/+8
| | | | | | | | all embedders of content. I've based the refactoring on the existing BrowserMainParts. This is the first step; I didn't want to do it all at the same time because it would be too big. Remaining tasks:-rename the browser_main files in chrome to chrome_browser_main-move the OS specific implementations of BrowserMainParts that are needed for content-finish splitting the remaining BrowserMain function (now that's in TemporaryContinue())BUG=90445 Review URL: http://codereview.chromium.org/7779040 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@99884 0039d316-1c4b-4281-b951-d872f2087c98
* If no locale data files can be found, show a dialog and exittony@chromium.org2011-08-121-0/+16
| | | | | | | | | | | with RESULT_CODE_MISSING_DATA. We used to just CHECK() crash. BUG=69194 Review URL: http://codereview.chromium.org/7610009 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@96627 0039d316-1c4b-4281-b951-d872f2087c98
* Take two at splitting result codes between content and chrome.dpranke@chromium.org2011-07-191-2/+2
| | | | | | | | | | | | content/common/result_codes.h contains only the codes defined in content. chrome/common/chrome_result_codes.h contains the codes defined in chrome and also includes (for convenience) the content header. R=jam@chromium.org BUG=76699 TEST=everything compiles Review URL: http://codereview.chromium.org/7397004 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@93082 0039d316-1c4b-4281-b951-d872f2087c98
* Revert r92730, r92731, r92732 ... will land again once I ensure the win ↵dpranke@chromium.org2011-07-151-2/+2
| | | | | | | | | | | | | builds compile. TBR=jam@chromium.org BUG=none TEST= Review URL: http://codereview.chromium.org/7400002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@92733 0039d316-1c4b-4281-b951-d872f2087c98
* This change will split the result codes between content and chrome.dpranke@chromium.org2011-07-151-2/+2
| | | | | | | | | | | | | | | This adds a new file into chrome/common and does a lot of renaming. The current version is just a sketch of the headers, and nothing will compile. R=jam@chromium.org BUG=76699 TEST=everything still compiles and runs Review URL: http://codereview.chromium.org/7377010 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@92730 0039d316-1c4b-4281-b951-d872f2087c98
* If background thread gets XIOError, don't call shutdowndavemoore@chromium.org2011-05-111-0/+21
| | | | | | | | | BUG=82194 TEST=None Review URL: http://codereview.chromium.org/7015013 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@85072 0039d316-1c4b-4281-b951-d872f2087c98
* Fix inverted logic for aborting out of the running as root check.mbelshe@chromium.org2011-04-291-1/+1
| | | | | | | | | | | We want to skip the check if a user data dir is specified, not if one is not specified. BUG=none TEST=none Review URL: http://codereview.chromium.org/6901054 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@83511 0039d316-1c4b-4281-b951-d872f2087c98
* Add a histogram to record time elapsed before we start the browser message loop.siggi@chromium.org2011-04-151-0/+4
| | | | | | | | | BUG=none TEST=none Review URL: http://codereview.chromium.org/6853023 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@81775 0039d316-1c4b-4281-b951-d872f2087c98
* Move crypto files out of base, to a top level directory.rvargas@google.com2011-04-141-2/+2
| | | | | | | | | | | | | src/crypto is now an independent project that contains our cryptographic primitives (except md5 and sha1). This removes the base dependency from nss, openssl and sqlite. BUG=76996 TEST=none Review URL: http://codereview.chromium.org/6805019 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@81611 0039d316-1c4b-4281-b951-d872f2087c98
* Cleanup: Update a bunch of files to the new location of browser_list.h. Part ↵tfarina@chromium.org2011-04-061-2/+2
| | | | | | | | | | | | | 1/3. BUG=None TEST=None R=avi@chromium.org Review URL: http://codereview.chromium.org/6689029 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@80632 0039d316-1c4b-4281-b951-d872f2087c98
* Move the remaining files in chrome\common to content\common.jam@chromium.org2011-03-171-1/+1
| | | | | | | TBR=avi Review URL: http://codereview.chromium.org/6672070 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@78516 0039d316-1c4b-4281-b951-d872f2087c98
* Add cmdline switch for folks that really did want to run as root.mbelshe@chromium.org2011-03-081-0/+4
| | | | | | | | | BUG=none TEST=none Review URL: http://codereview.chromium.org/6621045 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@77292 0039d316-1c4b-4281-b951-d872f2087c98
* Post a task to log the error messages.backer@chromium.org2011-03-041-2/+3
| | | | | | | | | | | | X error handlers cannot safely make X calls inside the error handler. To provide more meaningful error messages, it is necessary to query the X server. This patch changes the X error handlers to post a task to decode and log the error message. This has a disadvantage of clearing the call stack, but given that most X calls are processed asynchronously, the call stack typically isn't meaningful. BUG=64819 TEST=by hand on Linux Review URL: http://codereview.chromium.org/6623014 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@76926 0039d316-1c4b-4281-b951-d872f2087c98
* GTK: Refuse to run as root.erg@google.com2011-03-021-0/+45
| | | | | | | | | | | | | | | | Running chrome with sudo will change the owner of chrome's config files. This is really bad and more people accidentally run 'sudo chrome' once and then screw their profile up. Inspired by a real life support case this morning and rereading jwz's take on the issue on evanm@'s blog. BUG=74594 TEST='sudo chrome' pops up a nice error message and all the files in the profile directory aren't owned by root. Review URL: http://codereview.chromium.org/6591083 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@76565 0039d316-1c4b-4281-b951-d872f2087c98
* Delete the temporary headers left behind in chrome\browser. I've left ↵jam@chromium.org2011-03-011-2/+2
| | | | | | | | | browser_thread.h for another change, since 450 files include it. TBR=avi Review URL: http://codereview.chromium.org/6596060 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@76326 0039d316-1c4b-4281-b951-d872f2087c98
* Move a bunch of random other files to src/ui/baseben@chromium.org2011-01-201-6/+4
| | | | | | | | | | BUG=none TEST=none TBR=brettw Review URL: http://codereview.chromium.org/6257006 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@71970 0039d316-1c4b-4281-b951-d872f2087c98
* Add a new GetInstance() method for singleton classes used in chrome/browser ↵satish@chromium.org2010-12-091-2/+2
| | | | | | | | | | | | | | | | files. This CL includes half of the files under chrome/browser using Singleton<T>. The rest of the files will be sent in a second CL. In one case I used a LazyInstance<T> instead of Singleton<T> as that was simpler and necessary since T was a typedef and can't add member functions to it. BUG=65298 TEST=all existing tests should continue to pass. Review URL: http://codereview.chromium.org/5519016 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@68723 0039d316-1c4b-4281-b951-d872f2087c98
* startup: rename chrome_dll_main to chrome_mainevan@chromium.org2010-11-181-1/+1
| | | | | | | | | | | | | | | Startup works like this: 1) platform-specific main, which calls 2) ChromeMain(), which calls 3) subprocess-specific main, like RendererMain() On Windows the middle step is kept in a DLL, but it's a framework on Mac and it's part of the original binary on Linux. This no-op change renames the file to match the function it does. Review URL: http://codereview.chromium.org/5183003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@66660 0039d316-1c4b-4281-b951-d872f2087c98
* startup: move some browser startup code into BrowserMainevan@chromium.org2010-11-121-1/+59
| | | | | | | | | | | | There was a block of code that was #ifdef LINUX right before our call to BrowserMain(). We can instead put that code into BrowserMain(), which knows how to delegate to multiple platforms. TEST=should be just a refactoring change, all tests should still pass Review URL: http://codereview.chromium.org/4579002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@65892 0039d316-1c4b-4281-b951-d872f2087c98
* Rename WindowsSessionEnding to SessionEnding since it's used on multiple ↵thestig@chromium.org2010-11-101-1/+1
| | | | | | | | | | platforms. BUG=none TEST=none Review URL: http://codereview.chromium.org/4681004 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@65698 0039d316-1c4b-4281-b951-d872f2087c98
* Move debug-related stuff from base to the base/debug directory and use thebrettw@chromium.org2010-10-261-3/+3
| | | | | | | | | | | | | | | | base::debug namespace. This splits apart debug_util into base/debugger and base/stack_trace There are still two functions in debug_util that I'm not sure what to do with. Since this uses the base::debug namespace, I removed the functions in debugger.h from the static class and just made them free functions in the namespace. TEST=it compiles BUG=none Review URL: http://codereview.chromium.org/3945002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@63859 0039d316-1c4b-4281-b951-d872f2087c98
* Make our X11 error handler more descriptivejamesr@chromium.org2010-09-161-1/+1
| | | | | | | | | BUG=none TEST=trigger X11 error, look at the error dialog Review URL: http://codereview.chromium.org/3425006 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@59595 0039d316-1c4b-4281-b951-d872f2087c98
* This is a second attempt of http://codereview.chromium.org/3175038davemoore@chromium.org2010-09-131-0/+36
| | | | | | | | | | | | | | | | | | | | | | | | | | | | It failed the Vista Perf UI tests. This is because those tests close the browser upon an error. And they always get an error when the session is closed in the middle of the test. The new changes are in chrome/browser/automation/testing_automation_provider.cc BUG=50006 TEST=Run chrome under nested window manager using Xephyr (see http://code.google.com/p/chromium/wiki/LayoutTestsLinux) use --enable-logging=stderr --log-level=0 kill xephyr examine log. You should see X IO Error detected followed (not necessarily immediately) by successfully saved /tmp/tx/Default/Preferences successfully saved /tmp/tx/Local State successfully saved /tmp/tx/Local State successfully saved /tmp/tx/Default/Preferences along with no crash. BUG= TEST= Review URL: http://codereview.chromium.org/3364019 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@59269 0039d316-1c4b-4281-b951-d872f2087c98
* Revert 59147 - Allow overriding of X error functionsdavemoore@chromium.org2010-09-101-36/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | BUG=50006 (and various other reports) TEST=Run chrome under nested window manager using Xephyr (see http://code.google.com/p/chromium/wiki/LayoutTestsLinux) use --enable-logging=stderr --log-level=0 kill xephyr examine log. You should see X IO Error detected followed (not necessarily immediately) by successfully saved /tmp/tx/Default/Preferences successfully saved /tmp/tx/Local State successfully saved /tmp/tx/Local State successfully saved /tmp/tx/Default/Preferences along with no crash. There is a high ranking crash report on both linux and chromeos that happens whenever X sends an error to chrome. This change causes us to log and continue when we get a regular error from X. When we get an IO error, indicating X is gone, we attempt to shut down gracefully. Review URL: http://codereview.chromium.org/3175038 TBR=davemoore@chromium.org Review URL: http://codereview.chromium.org/3332019 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@59175 0039d316-1c4b-4281-b951-d872f2087c98
* Allow overriding of X error functionsdavemoore@chromium.org2010-09-101-0/+36
| | | | | | | | | | | | | | | | | | | | | | | BUG=50006 (and various other reports) TEST=Run chrome under nested window manager using Xephyr (see http://code.google.com/p/chromium/wiki/LayoutTestsLinux) use --enable-logging=stderr --log-level=0 kill xephyr examine log. You should see X IO Error detected followed (not necessarily immediately) by successfully saved /tmp/tx/Default/Preferences successfully saved /tmp/tx/Local State successfully saved /tmp/tx/Local State successfully saved /tmp/tx/Default/Preferences along with no crash. There is a high ranking crash report on both linux and chromeos that happens whenever X sends an error to chrome. This change causes us to log and continue when we get a regular error from X. When we get an IO error, indicating X is gone, we attempt to shut down gracefully. Review URL: http://codereview.chromium.org/3175038 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@59147 0039d316-1c4b-4281-b951-d872f2087c98
* BrowserMain() refactoring, part 2.viettrungluu@chromium.org2010-07-271-3/+0
| | | | | | | | | | | | Add "MainMessageLoopStart()" and related platform methods to handle tasks directly tied to the start of the main message loop. BUG=none TEST=everything still works Review URL: http://codereview.chromium.org/2931007 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@53783 0039d316-1c4b-4281-b951-d872f2087c98
* Auto restart when update available while running in the background on windows.atwilson@chromium.org2010-04-091-4/+0
| | | | | | | | | | | | | | | | | | | | | | | | Landing on behalf of dbelenko@google.com. This is a new version of the older patch. Main changes include: 1. Rebased to a never Git revision to make things easier to land. 2. Chrome will now preserve the command line switches except for those that are blacklisted. 3. Fixed a race condition that would cause the browser to think it didn't exit cleanly after it's been restarted. 4. Fixed minor nits and omissions (indentation, etc). This patch adds a timer which fires every 6 hours and checks whether the browser is in the "persistent" (background) mode, and whether there's an update pending restart. If both conditions are true, the browser is restarted with blacklisted command line keys and all loose values stripped. In order to restart the browser in the background mode, the --long-lived-extensions key is also added to the command line. This change is Windows-only, and it won't become fully functional until Drew (atwilson) checks in his work that enables Chrome to go into background. Additionally, this addresses an issue where a restarted browser might load its profile data before the previous browser process exited - we now load the profile data *after* trying to contact the other browser. This exposed a race condition in SessionRestoreUITest.RestoreAfterClosingTabbedBrowserWithAppAndLaunching, so we disabled that test and logged http://crbug.com/40946. BUG=40975,40946 Review URL: http://codereview.chromium.org/1618012 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@44121 0039d316-1c4b-4281-b951-d872f2087c98
* Revert 43989 - This is a new version of the older patch. Main changes include:atwilson@chromium.org2010-04-091-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | 1. Rebased to a never Git revision to make things easier to land. 2. Chrome will now preserve the command line switches except for those that are blacklisted. 3. Fixed a race condition that would cause the browser to think it didn't exit cleanly after it's been restarted. 4. Fixed minor nits and omissions (indentation, etc). This patch adds a timer which fires every 6 hours and checks whether the browser is in the "persistent" (background) mode, and whether there's an update pending restart. If both conditions are true, the browser is restarted with blacklisted command line keys and all loose values stripped. In order to restart the browser in the background mode, the longlivedextensions key is also added to the command line. This change is Windowsonly, and it won't become fully functional until Drew (atwilson) checks in his work that enables Chrome to go into background. Review URL: http://codereview.chromium.org/1617001 TBR=atwilson@chromium.org Review URL: http://codereview.chromium.org/1517027 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@44041 0039d316-1c4b-4281-b951-d872f2087c98
* This is a new version of the older patch. Main changes include:atwilson@chromium.org2010-04-081-4/+0
| | | | | | | | | | | | | | | | | | | | | | | 1. Rebased to a never Git revision to make things easier to land. 2. Chrome will now preserve the command line switches except for those that are blacklisted. 3. Fixed a race condition that would cause the browser to think it didn't exit cleanly after it's been restarted. 4. Fixed minor nits and omissions (indentation, etc). This patch adds a timer which fires every 6 hours and checks whether the browser is in the "persistent" (background) mode, and whether there's an update pending restart. If both conditions are true, the browser is restarted with blacklisted command line keys and all loose values stripped. In order to restart the browser in the background mode, the --long-lived-extensions key is also added to the command line. This change is Windows-only, and it won't become fully functional until Drew (atwilson) checks in his work that enables Chrome to go into background. Review URL: http://codereview.chromium.org/1617001 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@43989 0039d316-1c4b-4281-b951-d872f2087c98
* Do some browser_main cleanup. This moves ChromeOS login manager and some firstbrettw@chromium.org2010-03-241-7/+3
| | | | | | | | | | | | | run UI stuff to new helper functions. It renames CheckForWin2000 to a generic one that each platform can implement according to its needs. I removed the Platform namespace which was improperly named, and didn't seem to be helping anything anyway. TEST=none BUG=none Review URL: http://codereview.chromium.org/1139009 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@42528 0039d316-1c4b-4281-b951-d872f2087c98
* Linux: Implement RecordBreakpadStatusUMA.thestig@chromium.org2009-12-101-1/+12
| | | | | | | | BUG=21732 TEST=none Review URL: http://codereview.chromium.org/489002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@34220 0039d316-1c4b-4281-b951-d872f2087c98
* Chrome should shut down cleanly when quit from the Dock icon menu, duringmark@chromium.org2009-09-151-1/+1
| | | | | | | | | | | | | | | | | | | | | | user logout, and during system restart and shutdown. MainMenu.xib changes (because you're not expected to parse nibs yourself): - The quit menu item's action is changed from the AppController object's -quit: method (which no longer exists) to the application object's -terminate: method (the Cocoa standard). - The application and owner object types are changed from NSApplication to CrApplication. - The application menu name is changed from Chromium to ^IDS_SHORT_PRODUCT_NAME. Cocoa doesn't use this anyway, it gets replaced at runtime with the localized value of CFBundleName, but we shouldn't have branding-specific strings in our nibs. BUG=18078 TEST=Use Chrome for a while, quit it from the Dock icon menu, and relaunch. You should NOT see the "Google Chrome didn't shut down correctly" info bar. Review URL: http://codereview.chromium.org/201121 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@26269 0039d316-1c4b-4281-b951-d872f2087c98
* Send Breakpad and debugger status to the metrics service on the Mac.mark@chromium.org2009-09-141-3/+16
| | | | | | | | | | BUG=21731 TEST=Metrics data should have the correct values for breakpadregistrationok, breakpadregistrationfail, debuggerpresent, and debuggernotpresent in log.profile.stability. Review URL: http://codereview.chromium.org/203050 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@26093 0039d316-1c4b-4281-b951-d872f2087c98
* Move chrome/apps/result_codes.h to chrome/common/result_codes.hthestig@chromium.org2009-03-031-1/+1
| | | | | | Review URL: http://codereview.chromium.org/28279 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@10761 0039d316-1c4b-4281-b951-d872f2087c98
* put browser_main_gtk.cc next to other browser_main* cc files.tc@google.com2009-02-171-0/+35
| | | | | | | Review URL: http://codereview.chromium.org/21418 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@9887 0039d316-1c4b-4281-b951-d872f2087c98
* Porting the toolbar to GTK.erg@google.com2009-02-091-35/+0
| | | | | | | | | | | | Quite a bit of TODOs in the code, but it displays and properly enables/disables buttons and routes mouse clicks. This also moves all the gtk files into the gtk/ folder, at Ben's request. Review URL: http://codereview.chromium.org/21176 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@9421 0039d316-1c4b-4281-b951-d872f2087c98
* Create a stub chrome executable that crashes when run.tc@google.com2009-01-291-0/+35
This is mostly making sure we have all the symbols we need. Review URL: http://codereview.chromium.org/19683 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@8930 0039d316-1c4b-4281-b951-d872f2087c98