summaryrefslogtreecommitdiffstats
path: root/chrome/browser/browser_init.cc
Commit message (Collapse)AuthorAgeFilesLines
* Fix SecondLaunch unit test.evan@chromium.org2009-01-211-1/+2
| | | | | | | | | BUG=6722 Review URL: http://codereview.chromium.org/18472 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@8410 0039d316-1c4b-4281-b951-d872f2087c98
* Make CommandLine into a normal object, with some statics for getting at the ↵evan@chromium.org2009-01-211-26/+24
| | | | | | | | | | | current process's command line. One explicit goal of this change is to *not* deal with the string/wstring issues at the API on POSIX; the functions are the same as before, which means they remain as broken as before. (I did try to fix the internals, though, so migrating the callers is now possible by adding platform-appropriate hooks.) Review URL: http://codereview.chromium.org/18248 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@8347 0039d316-1c4b-4281-b951-d872f2087c98
* Fix issue 6296 by using a dedicated delegate instance for each infobar that ↵tim@chromium.org2009-01-161-0/+2
| | | | | | | | | | | | | the PasswordManager opens, rather than always using the PasswordManager itself as the delegate. The crash was occuring because before one infobar completely finished closing (i.e during its close animation), another password infobar would be opened, and for a moment in time two infobars are pointing to the same delegate. When the initial closing animation completes, it would null-out a field (pending_decision_manager_), which the now visible infobar would depend on when the user clicks one of the native buttons. This click would dereference a null member, hence causing the crash. Other clients of infobars seem to be immune to this problem because they either all create dedicated delegate instances per infobar, or they don't reset any state on InfoBarClosed. I think (at the very least) the infobar code should document that it can be risky to use a "shared" delegate due to the possibility of two simultaneously visible infobars referring to the same delegate. Review URL: http://codereview.chromium.org/18065 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@8236 0039d316-1c4b-4281-b951-d872f2087c98
* Move url_* to net subdirben@chromium.org2009-01-161-1/+1
| | | | | | Review URL: http://codereview.chromium.org/18305 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@8224 0039d316-1c4b-4281-b951-d872f2087c98
* Move a bunch of TabContents related files into a tab_contents subdirben@chromium.org2009-01-151-2/+2
| | | | | | Review URL: http://codereview.chromium.org/18250 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@8058 0039d316-1c4b-4281-b951-d872f2087c98
* Fixes two session restore bugs:sky@google.com2008-12-111-1/+11
| | | | | | | | | | | | | | | | . If the user launches incognito we don't attempt to restore last session and instead just do default launch behavior (new tab page). . Don't show the session restore info bar when launched incognito. I'm assuming that if the user launched in incognito they were previously running incognito so that there is nothing to restore. BUG=4381 5119 TEST=turn on session restore and launch with --incognito, make sure the incognito window comes up. Review URL: http://codereview.chromium.org/13368 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@6776 0039d316-1c4b-4281-b951-d872f2087c98
* Makes the tab restore service persist closed tabs/windows to disk andsky@google.com2008-12-061-4/+3
| | | | | | | | | | | | | | | | | reload them when asked. Sorry for largish looking change. It's made big by refactoring common code between TabRestoreService and SessionService into a common superclass. At the same time I removed some dead code and shuffled the session related classes into a single directory for easier perusal. BUG=384 TEST=close the browser, start the browser and make sure the new tab page shows closed windows/tabs from the previous session. Review URL: http://codereview.chromium.org/13152 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@6490 0039d316-1c4b-4281-b951-d872f2087c98
* Introduce ExtensionsService. Load extensions on startup from a directory inaa@chromium.org2008-12-051-0/+6
| | | | | | | | | | the profile if a command-line flag is present. Please carefully scrutinize the threading/ref-counting schenanigans. Review URL: http://codereview.chromium.org/12876 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@6403 0039d316-1c4b-4281-b951-d872f2087c98
* Tear out all the old infobar code.ben@chromium.org2008-12-031-1/+0
| | | | | | | | http://crbug.com/4620 Review URL: http://codereview.chromium.org/13077 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@6273 0039d316-1c4b-4281-b951-d872f2087c98
* Convert Alternate NavURL Fetcher to use the new infobar framework.ben@chromium.org2008-12-031-2/+2
| | | | | | | | http://crbug.com/4620 Review URL: http://codereview.chromium.org/13070 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@6268 0039d316-1c4b-4281-b951-d872f2087c98
* Fix crash with plugin installer infobar due to the infobardelegate not being ↵ben@chromium.org2008-11-251-1/+2
| | | | | | | | | | removed from the containing TabContents. http://crbug.com/4620 Review URL: http://codereview.chromium.org/12624 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@5957 0039d316-1c4b-4281-b951-d872f2087c98
* Re-land 5929 (r5882) with crash fix and also this change:ben@chromium.org2008-11-251-9/+44
| | | | | | | | | | | http://codereview.chromium.org/11392/show which fixes the remainder of the UI test issues apparently. http://crbug.com/4620 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@5954 0039d316-1c4b-4281-b951-d872f2087c98
* Land this change again now I've fixed the crash.ben@chromium.org2008-11-191-1/+1
| | | | git-svn-id: svn://svn.chromium.org/chrome/trunk/src@5669 0039d316-1c4b-4281-b951-d872f2087c98
* Revert change 5596 because it broke the buildnsylvain@chromium.org2008-11-181-1/+1
| | | | | | Review URL: http://codereview.chromium.org/11439 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@5598 0039d316-1c4b-4281-b951-d872f2087c98
* Last couple of bits of new-frame related cleanup:ben@chromium.org2008-11-181-1/+1
| | | | | | | | | | | | | - Remove frame_util.cc, moving functions to BrowserList (endsession) and BrowserView (GetBrowserWindowForHWND) - Tidy up interface for TabIconView model. The model now sources only the information it needs (loading state and favicon). - Replace BrowserType class with an enum on Browser. http://crbug.com/2320 http://crbug.com/3363 Review URL: http://codereview.chromium.org/10786 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@5596 0039d316-1c4b-4281-b951-d872f2087c98
* Add Terminate() to the Process object, have RenderProcessHost use this to ↵brettw@google.com2008-11-141-5/+3
| | | | | | | | | | avoid some more Windows specific code. Move Process and SharedMemory into the base namespace (most changes). Review URL: http://codereview.chromium.org/10895 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@5446 0039d316-1c4b-4281-b951-d872f2087c98
* Re-do the way browser windows are shown:ben@chromium.org2008-11-141-68/+22
| | | | | | | | | | | | | | | | | | | | | | | | | | | - Remove the path from WinMain to the Browser object passing the show_command. For the Browser object, this is a problem since this value isn't portable. For the code in general it involves a lot of ugly wiring. It's completely unnecessary since the value is obtainable via GetStartupInfo. - Remove show_command plumbing from all over the place (session restore, web app launcher, etc) Change the way browser windows are constructed: - The browser constructor now takes just a type and a profile, and simply initializes the object. - Some configuration that used to be part of the constructor that was only used in one or two use cases (initial bounds, maximized state, web app name) are split into separate setters. - Window creation is split out into a separate step to be called post configuration. - Assorted static helper functions added to Browser to make construction of common types easy. - Remove Browser::Show in favor of BrowserWindow::Show - Adjust all callers to use the new helpers. Change the way ChromeViews restores window placement: - Split restored size determination from restored maximized determination. They are needed by the code at different times. Size restoration happens when the window is constructed and Window::SetInitialBounds is called. Maximized state restoration happens when the window is shown for the first time and SW_SHOWMAXIMIZED or SW_SHOWNORMAL is needed. Thus, replace WindowDelegate::RestoreWindowPosition with WindowDelegate::RestoreWindowBounds and WindowDelegate::RestoreMaximizedState. - Window::SetInitialBounds calls WindowDelegate::RestoreWindowBounds - Window::Show calls WindowDelegate::RestoreMaximizedState - Adjusts all WindowDelegate implementations that override RestoreWindowPosition to implement these new methods instead. - Move "playback/record" mode window size setting from browser_init to Browser::RestoreWindowBounds. - Provide a virtual function on Window called GetShowState that determines the default show state to be used when Window::Show is called. For most windows and dialogs this is SW_SHOWNORMAL. AeroGlassFrame/OpaqueFrame (the browser window frames) override this since they're the app's main windows to return the value provided by GetStartupInfo which gives the value from the app shortcut. http://crbug.com/3557 Review URL: http://codereview.chromium.org/10896 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@5417 0039d316-1c4b-4281-b951-d872f2087c98
* More cleanup in Browser:ben@chromium.org2008-11-111-1/+1
| | | | | | | | | | - remove "RunSimpleFrameMenu" method that isn't used anymore. - rename Browser::GetType() to Browser::type() Review URL: http://codereview.chromium.org/10605 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@5209 0039d316-1c4b-4281-b951-d872f2087c98
* Changes session restore to account for apps and popups. If you havesky@google.com2008-10-301-43/+50
| | | | | | | | | | | | | | | | | | | | | session restore enabled any time you transition from no tabbed browsers to a tabbed browser (in the same profile) we restore your last session, where the last session was any previously open tabbed browsers. For example, if you start Chrome from an installed app shortcut then create a new tabbed browser (by any means) we'll restore your last session. This gives the illustion that apps are running in their own process. I would love to have test coverage of this, but I'm loathe to write anymore flakey UI tests. Need to revisit post 1.0. BUG=1883 TEST=thoroughly test session restore, especially with application shortcuts and popups. Review URL: http://codereview.chromium.org/8856 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@4202 0039d316-1c4b-4281-b951-d872f2087c98
* Plumb the referrer throughout the OpenURL APIs.ericroman@google.com2008-10-271-1/+1
| | | | | | | | | | | | | http://code.google.com/p/chromium/issues/detail?id=3224 Caveats: * Did not update TabNavigation yet. Hence session restore will continue to load the tabs with empty referrer. * Did not plumb referrer into incognito url open. (Not sure what the right thing to do is here with respect to privacy vs compatibility.) * Did not plumb referrer throughout the automation controller. No functional impact here, but it makes the code inconsistent with the non-automation version. Review URL: http://codereview.chromium.org/8186 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@4036 0039d316-1c4b-4281-b951-d872f2087c98
* Reduce header dependencies.evanm@google.com2008-10-221-0/+1
| | | | | | | | | Random files in V8Bindings were getting rebuilt when I touched process_util.h. I tracked it down to stats_table.h and shared_memory.h. This change cuts down some dependencies there; more could be removed if we made some of our FooHandle typedefs into abstract data types instead. Review URL: http://codereview.chromium.org/7307 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@3770 0039d316-1c4b-4281-b951-d872f2087c98
* Move more view stuff out of WebContents. This moves context menus and infobrettw@google.com2008-10-141-2/+5
| | | | | | | | | | bars. I removed the associated functions on TabContents, and have callers call directly through to the view when the care about mucking with the info bar (which is busted, IMO). Review URL: http://codereview.chromium.org/7245 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@3346 0039d316-1c4b-4281-b951-d872f2087c98
* Adds an --incognito switch that can be used to launch Chrome in Incognito mode.maruel@google.com2008-10-081-0/+4
| | | | | | | | | | | | | | | | You can combine this with --app= to launch an app in Chrome that has no effect on the user's profile. Note that this is not the same thing as launching chrome.exe --user-data-dir=/dev/null, which would give you an completely empty profile instead of loading the user's profile as read-only. BUG=1790,2012 Patch by Yarin Kaul <yarin.kaul@gmail.com> Review URL: http://codereview.chromium.org/6584 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@3013 0039d316-1c4b-4281-b951-d872f2087c98
* Add a command-line switch to change the user agent.BUG=757345pkasting@chromium.org2008-09-241-0/+6
| | | | | | Review URL: http://codereview.chromium.org/4059 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@2571 0039d316-1c4b-4281-b951-d872f2087c98
* Remove Google Chrome specific strings from common resources file and use ↵rahulk@google.com2008-08-271-0/+1
| | | | | | | | | them from new resources file that is specific to only Google Chrome. BUG=1110882 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@1473 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
* Large patch set (159 files total) to cleanup the includes.maruel@google.com2008-08-151-1/+2
| | | | | | | | | | - Slightly reduce the size of the generated .lib files ~3%. - Reduce the number of implicit and explicit atl and windows includes. hooray! - Help incremental build by reducing the number of unnecessary included files. - Split some template class in two, one base class for the common code and the specialization that inherits from the base class. git-svn-id: svn://svn.chromium.org/chrome/trunk/src@937 0039d316-1c4b-4281-b951-d872f2087c98
* Introduce MessagePump to represent the native message pump used to drive adarin@google.com2008-08-151-2/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | MessageLoop. A MessageLoop now has a MessagePump. This will make it possible to port the MessagePump interface to other platforms as well as to use an IO completion port for our worker threads on Windows. Currently, there is only MessagePumpWin, which attempts to preserve the pre-existing behavior of the MessageLoop. API changes to MessageLoop: 1. MessageLoop::Quit means return from Run when the MessageLoop would otherwise wait for more work. 2. MessageLoop::Quit can no longer be called outside the context of an active Run call. So, things like this: MessageLoop::current()->Quit(); MessageLoop::current()->Run(); are now: MessageLoop::current()->RunAllPending(); 3. MessageLoop::Quit can no longer be called from other threads. This means that PostTask(..., new MessageLoop::QuitTask()) must be used explicitly to Quit across thread boundaries. 4. No protection is made to deal with nested MessageLoops involving watched objects or APCs. In fact, an assertion is added to flag such cases. This is a temporary measure until object watching and APC facilities are removed in favor of a MessagePump designed around an IO completion port. As part of this CL, I also changed the automation system to use an IPC::ChannelProxy instead of an IPC::Channel. This moves the automation IPC onto Chrome's IO thread where it belongs. I also fixed some abuses of RefCounted in the AutomationProvider class. It was deleting itself in some cases! This led to having to fix the ownership model for AutomationProvider, which explains the changes to AutomationProviderList and so on. git-svn-id: svn://svn.chromium.org/chrome/trunk/src@928 0039d316-1c4b-4281-b951-d872f2087c98
* HuntForZombieChromeProcesses() is killing the child process of upgradecpu@google.com2008-08-141-1/+2
| | | | | | | | | | - remove call from MessageWindow::~MessageWindow() - fix bug in zombie killer so it recognizes own childs BUG=1323601 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@851 0039d316-1c4b-4281-b951-d872f2087c98
* Move more net classes into the net namespace. Also remove the net_util ↵darin@google.com2008-07-311-1/+1
| | | | | | | | namespace in favor of the net namespace. This is a purely mechanical change. There should be no logic changes. git-svn-id: svn://svn.chromium.org/chrome/trunk/src@192 0039d316-1c4b-4281-b951-d872f2087c98
* Fix 1295677: REGRESSION: Import SETS startup page to imported home page.finnur@google.com2008-07-301-0/+1
| | | | | | | | | We had only kHomePage pref before, which if blank/set to chrome-internal: meant that the New Tab page should be shown when Home is pressed. Now we add a pref called kHomePageIsNewTabPage for this purpose, which allows us to set the kHomePage value during import without actually using it as the HomePage (effectively importing home page becomes importing a default suggestion for when the users want a home page instead of the New Tab page). BUG=1295677 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@107 0039d316-1c4b-4281-b951-d872f2087c98
* Add chrome to the repository.initial.commit2008-07-261-0/+723
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@15 0039d316-1c4b-4281-b951-d872f2087c98