summaryrefslogtreecommitdiffstats
path: root/chrome/browser/sessions
Commit message (Collapse)AuthorAgeFilesLines
* Implement restoring closed tab menu item. Reworked cross-platform code to ↵pinkerton@chromium.org2009-06-193-67/+52
| | | | | | | | | | handle the case of restoring when there are no browsers open by making window restore re-use a given browser if it has no tabs. Removed unit test that assumes it can pass a NULL Browser. Wrote a new UI test to cover the same area, but it's disabled until another bug is fixed, and I didn't want to hold up landing this feature. Added key shortcut for "open window in incognito mode". BUG=13758 TEST=restoring closed tabs with visible windows and with no windows remaining open. Review URL: http://codereview.chromium.org/125257 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@18806 0039d316-1c4b-4281-b951-d872f2087c98
* Reduce header dependencies in browser/phajdan.jr@chromium.org2009-06-132-0/+2
| | | | | | | | | | | | - remove unneeded header includes - move implementation bits out of headers - more explicit header deps In my scan of headers I got up to (including) dom_ui. Review URL: http://codereview.chromium.org/126071 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@18353 0039d316-1c4b-4281-b951-d872f2087c98
* Headers cleanup in chrome/browser/phajdan.jr@chromium.org2009-06-032-0/+2
| | | | | | | | | | | - reduce header dependencies - miscellanous cleanups (add missing includes for OS_ defines etc) Further changesets may follow. I was only looking at header files up to character_encoding.h. Review URL: http://codereview.chromium.org/118072 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@17470 0039d316-1c4b-4281-b951-d872f2087c98
* Cleanup temp files/folders in a few more tests.munjal@chromium.org2009-06-011-1/+5
| | | | | | Review URL: http://codereview.chromium.org/118074 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@17359 0039d316-1c4b-4281-b951-d872f2087c98
* Fix namespace to ultimately compile on Macpinkerton@chromium.org2009-05-291-2/+2
| | | | | | | | BUG=none TEST=none Review URL: http://codereview.chromium.org/115924 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@17187 0039d316-1c4b-4281-b951-d872f2087c98
* Make automation proxy objects to ref_counted. That allows to process async ↵stoyan@chromium.org2009-05-281-35/+34
| | | | | | | | | | | notifications directly in channel background thread. Add support for listener-less ChannelProxy. BUG=none TEST=none Review URL: http://codereview.chromium.org/113722 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@17093 0039d316-1c4b-4281-b951-d872f2087c98
* More NotificationRegistrar conversions.pkasting@chromium.org2009-05-221-30/+11
| | | | | | | BUG=2381 Review URL: http://codereview.chromium.org/113736 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@16700 0039d316-1c4b-4281-b951-d872f2087c98
* Enable one SessionRestoreUITest.huanr@chromium.org2009-05-141-49/+51
| | | | | | Review URL: http://codereview.chromium.org/113380 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@16064 0039d316-1c4b-4281-b951-d872f2087c98
* Try fixing session restore UI tests.huanr@chromium.org2009-05-081-29/+30
| | | | | | | | | - Change async ApplyAccelerator to sync RunCommand. - Renable disabled tests. Review URL: http://codereview.chromium.org/113129 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@15612 0039d316-1c4b-4281-b951-d872f2087c98
* Reverting 15399.maruel@chromium.org2009-05-061-2/+2
| | | | | | | broke purify Review URL: http://codereview.chromium.org/115026 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@15409 0039d316-1c4b-4281-b951-d872f2087c98
* Change Browser::GetIndexOfController to GetIndexOfTabContents. Now that webrettw@chromium.org2009-05-061-2/+2
| | | | | | | | don't have tab contents switching, identifying tabs by their controller is weird, so we should gradually move to only using TabContents*. Review URL: http://codereview.chromium.org/115018 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@15399 0039d316-1c4b-4281-b951-d872f2087c98
* honor index in createTab()rafaelw@chromium.org2009-05-061-1/+1
| | | | | | | | | BUG=11200 R=brettw,beng Review URL: http://codereview.chromium.org/99300 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@15392 0039d316-1c4b-4281-b951-d872f2087c98
* Move scoped_vector.h and stl_util-inl.h to base/ben@chromium.org2009-05-058-12/+12
| | | | | | | | http://crbug.com/11387 Review URL: http://codereview.chromium.org/107001 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@15272 0039d316-1c4b-4281-b951-d872f2087c98
* Replace all occurrances of WebContents with TabContents.brettw@chromium.org2009-05-042-6/+3
| | | | | | Review URL: http://codereview.chromium.org/99177 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@15194 0039d316-1c4b-4281-b951-d872f2087c98
* Yet more deprecation of the wstring version of PathService::Get() for UI tests.thestig@chromium.org2009-05-021-3/+2
| | | | | | Review URL: http://codereview.chromium.org/99298 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@15127 0039d316-1c4b-4281-b951-d872f2087c98
* Fix a bug in session restore on linux/mac. We were pickling thetc@google.com2009-05-012-14/+7
| | | | | | | | | | | | | | page title as a wstring, but reading it back as a string16. This allows the SessionRestoreUITests to pass. Also enable the inspector ui test which is currently disabled, but the code compiles fine on linux/mac. BUG=10516 Review URL: http://codereview.chromium.org/99297 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@15109 0039d316-1c4b-4281-b951-d872f2087c98
* Restore closed tabs into new windows when necessary, and track the windows theypam@chromium.org2009-04-222-24/+57
| | | | | | | | | | | | | | | | | | | came from so they're restored together (into the same new window) when appropriate. Fix safety check on tab index when restoring: make it check the correct browser. Change some ASSERTs to EXPECTs in the unit test for greater coverage. BUG=5278 TEST=Open a window with two tabs, close both (closing the window), then restore both. Make sure both restored tabs are in the same window. Open a window with multiple tabs, close a tab, then close the window using its close box. Restore both and make sure the tab goes back into the window. Review URL: http://codereview.chromium.org/92001 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@14234 0039d316-1c4b-4281-b951-d872f2087c98
* Rename web_contents_view* files to tab_contents_view* to reflect my previousbrettw@chromium.org2009-04-211-1/+1
| | | | | | | rename of the classes. Review URL: http://codereview.chromium.org/87009 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@14083 0039d316-1c4b-4281-b951-d872f2087c98
* When restoring a closed tab using either ctrl-shift-T or the context menu, putpam@chromium.org2009-04-202-3/+34
| | | | | | | | | | | | | | | | | | | it back into the window it came from, at the tabstrip index it occupied before, and activate (select) both the window and the tab. Restoring a tab from the New Tab Page replaces the NTP, as before. If the window the tab was in no longer exists, put the tab at the end of the current window's tabstrip. This behavior may change in a later patch. BUG=5278 TEST=Open two windows, with >1 tabs each. Close a tab, not the one at the end, in one of the windows. Switch to the other window and choose "Undo Closed Tab" from the tabstrip context menu, or type ctrl-shift-T. The tab should be restored where it was, and activated (selected and brought to the front). Review URL: http://codereview.chromium.org/69015 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@14062 0039d316-1c4b-4281-b951-d872f2087c98
* Re-land my change to clean up TabContents/WebContents ownership. Thisbrettw@chromium.org2009-04-204-25/+25
| | | | | | | | | | | | | | | | | | | | | | | | is the same except in tab_strip_model_unittest I fixed a leak by making a WebContents on the stack, I added a factory to the SiteInstance unittest to prevent another leak, and I re-added a NULL set to the external_tab_container. Fix the ownership model of TabContents and NavigationController. Previously the NavigationController owned the TabContents, and there were extra steps required at creation and destruction to clean everything up properly. NavigationController is now a member of TabContents, and there is no setup or tear down necessary other than the constructor and destructor. I could remove the tab contents creation in the NavigationController, as well as all the weird destruction code in WebContents which got moved to the destructor. I made the controller getter return a reference since the ownership is clear and there is no possibility of NULL. This required changing a lot of tiles, but many of them were simplified since they no longer have to NULL check. Previous review URL: http://codereview.chromium.org/69043 Review URL: http://codereview.chromium.org/67294 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@14053 0039d316-1c4b-4281-b951-d872f2087c98
* Reverting 14005.brettw@chromium.org2009-04-184-25/+25
| | | | git-svn-id: svn://svn.chromium.org/chrome/trunk/src@14006 0039d316-1c4b-4281-b951-d872f2087c98
* Fix the ownership model of TabContents and NavigationController. Previously thebrettw@chromium.org2009-04-184-25/+25
| | | | | | | | | | | | | | | | | NavigationController owned the TabContents, and there were extra steps required at creation and destruction to clean everything up properly. NavigationController is now a member of TabContents, and there is no setup or tear down necessary other than the constructor and destructor. I could remove the tab contents creation in the NavigationController, as well as all the weird destruction code in WebContents which got moved to the destructor. I made the controller getter return a reference since the ownership is clear and there is no possibility of NULL. This required changing a lot of tiles, but many of them were simplified since they no longer have to NULL check. Review URL: http://codereview.chromium.org/69043 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@14005 0039d316-1c4b-4281-b951-d872f2087c98
* Remove TabContnetsType from everywhere.brettw@chromium.org2009-04-152-2/+1
| | | | | | | | I also removed the notion of the "active" tab contents since there is only one per tab now, and all the messages to replace them. Review URL: http://codereview.chromium.org/67173 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@13808 0039d316-1c4b-4281-b951-d872f2087c98
* Remove TabContentsType from the NavigationController external interface and inbrettw@chromium.org2009-04-154-11/+11
| | | | | | | some related areas. I removed all uses of this in the previous patch. Review URL: http://codereview.chromium.org/73057 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@13730 0039d316-1c4b-4281-b951-d872f2087c98
* Implement chrome_proces_util for linux and enable download ui test.estade@chromium.org2009-04-141-11/+7
| | | | | | | | | | To get the PID from the socket, we use lsof (fuser doesn't work with unix sockets apparently). The download shelf, save page, and browser ui tests now pass. Review URL: http://codereview.chromium.org/66071 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@13716 0039d316-1c4b-4281-b951-d872f2087c98
* Remove the TestTabContents. This makes BrowserWithTestWindow use thebrettw@chromium.org2009-04-141-6/+2
| | | | | | | | | | | | | | | TestRenderViewHost instead. There are some changes to browser_commands_unittest to support this. Now that we're using proper TabContentes, I had to stub out a FocusManager call since there isn't a proper view hierarchy created. Remove TabContents collection and switching from the NavigationController. I tried to keep the same interface to the NavigationController since I tried that in a previous patch and the change blew up. Remove the TabContents factory. Callers now create a WebContents directly. Review URL: http://codereview.chromium.org/67113 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@13707 0039d316-1c4b-4281-b951-d872f2087c98
* UI test portage, second try.estade@chromium.org2009-04-091-1/+1
| | | | | | | | first try here: <http://codereview.chromium.org/63149> Review URL: http://codereview.chromium.org/67006 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@13464 0039d316-1c4b-4281-b951-d872f2087c98
* back out r13442estade@chromium.org2009-04-091-1/+1
| | | | | | | TBR=pinkerton git-svn-id: svn://svn.chromium.org/chrome/trunk/src@13443 0039d316-1c4b-4281-b951-d872f2087c98
* UI test string portage.estade@chromium.org2009-04-091-1/+1
| | | | | | | | | These files now compile on linux (but they don't link) and they still pass windows. When Pawel gets done with his changes to UI test stuff, we should be able to just enable these tests. The changes to chrome.gyp are just to fix lint errors. Review URL: http://codereview.chromium.org/63149 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@13442 0039d316-1c4b-4281-b951-d872f2087c98
* Re-land popup routing fix for browser.ben@chromium.org2009-04-071-1/+1
| | | | | | | | | | Just the bugfix + test now. Test is disabled pending a working framework. http://crbug.com/8472 Review URL: http://codereview.chromium.org/59007 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@13282 0039d316-1c4b-4281-b951-d872f2087c98
* Remove some uses of custom tab contents types from some tests.brettw@chromium.org2009-04-041-52/+49
| | | | | | | | | | | | | | | This required redoing the tests that used it to use the new RenderViewHost test harness. This is mostly straightforward, but required more work for the NavigationController tests. I removed a few random places that were testing for the tab types. I also made different versions of a few functions that don't take tab contents types next to the existing ones that do, so my touched code won't have to be changed again when I remove the tab contents types. Review URL: http://codereview.chromium.org/62039 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@13132 0039d316-1c4b-4281-b951-d872f2087c98
* Remove unneeded uses of base/pickle.h. Add some explicit #includes.thestig@chromium.org2009-04-031-1/+0
| | | | | | Review URL: http://codereview.chromium.org/60095 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@13093 0039d316-1c4b-4281-b951-d872f2087c98
* Cleanup in automation. Remove WaitForTabCountToChange.phajdan.jr@chromium.org2009-03-301-11/+11
| | | | | | | | | | WaitForTabCountToBecome is easier to use and more reliable. Also removed Windows2000-specific code from accessibility unit tests. Review URL: http://codereview.chromium.org/45070 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@12774 0039d316-1c4b-4281-b951-d872f2087c98
* Fixes bug where first login attempt to hotmail after session restoresky@chromium.org2009-03-263-103/+24
| | | | | | | | | | | | | | | | | wouldn't work. The problem was we weren't storing post URLs at all (because of bug 1361980). This resulted in session restore trying to restore some redirects along the way that likely had bogus state in them (perhaps referencing cookies that were nuked), resulting in the first login failing. The fix is to persist POST URLs to disk for session restore, but not the actual POST data. This way there shouldn't be any problems as outlined in 1361980. BUG=7727 TEST=see bug Review URL: http://codereview.chromium.org/42619 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@12568 0039d316-1c4b-4281-b951-d872f2087c98
* Porting of unit tests in chrome/phajdan.jr@chromium.org2009-03-241-28/+28
| | | | | | | | | | | | | | | | | | | | | | | | | | | - enable following tests on Linux: browser/net/resolve_proxy_msg_helper_unittest.cc browser/profile_manager_unittest.cc browser/sessions/tab_restore_service_unittest.cc common/time_format_unittest.cc - sync chrome.gyp - fix a bug in resolve_proxy_msg_helper_unittest that triggered a DCHECK on POSIX. It freed the WaitableEvent too early because Wait in dtor was effectively a noop because the event was already in signaled state from previous operations and a manual-reset flag was set. The fix was to put the WaitableEvent in automatic reset mode. - misc GCC-related cleanups http://crbug.com/9227 Review URL: http://codereview.chromium.org/53007 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@12356 0039d316-1c4b-4281-b951-d872f2087c98
* Get rid of WaitForWindowCountToChange.phajdan.jr@chromium.org2009-03-241-22/+6
| | | | | | | | | | | The function had confusing semantics, was marked to be removed, and could induce flakiness in tests which used it. WaitForWindowCountToBecome is much better replacement for it. Review URL: http://codereview.chromium.org/49007 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@12348 0039d316-1c4b-4281-b951-d872f2087c98
* Porting unit tests in chrome/phajdan.jr@chromium.org2009-03-171-5/+7
| | | | | | | | | | | | | | | | | Enable following tests on Linux: browser/autocomplete/autocomplete_unittest.cc browser/navigation_controller_unittest.cc browser/search_engines/template_url_model_unittest.cc browser/sessions/session_backend_unittest.cc browser/tab_contents/web_contents_unittest.cc Remove not-existing file from remove list for Linux. Check for zero-size write in SessionBackend because it's an error in POSIX (but is ok from the session backend's perspective). Review URL: http://codereview.chromium.org/42223 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@11852 0039d316-1c4b-4281-b951-d872f2087c98
* Removed unneeded includes of base/time.h.thestig@chromium.org2009-03-161-1/+0
| | | | | | Review URL: http://codereview.chromium.org/48019 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@11766 0039d316-1c4b-4281-b951-d872f2087c98
* Moving the storing/restoring of the focus from TabContents to ↵jcampan@chromium.org2009-03-121-1/+6
| | | | | | | | | | | | WebContentsView. This makes TabContents less dependent on views. This requires few contortions with DOMUIs (NTP, history and downloads tab) as they still need to set the initial focus specifically. BUG=None TEST=Run the interactive tests. Review URL: http://codereview.chromium.org/39269 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@11501 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
* Fixes session restore bug where we wouldn't necessarily correctlysky@google.com2009-03-091-1/+3
| | | | | | | | | | | | | | | restore the maximized state. The problem was we were using a boolean when we really needed three values: use the default, explicitly maximized or explicitly normal. I'm also removing a bogus DLOG in info_bubble. BUG=7930 TEST=see bug Review URL: http://codereview.chromium.org/40306 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@11287 0039d316-1c4b-4281-b951-d872f2087c98
* Fixes possible crash in SessionBackend. I believe what's happeningsky@google.com2009-03-093-7/+62
| | | | | | | | | | | | | | | | | | | | here is we fail to create the file, and so current_session_file_.get() is NULL and we crash. current_session_file_.get() is NULL if OpenAndWriteHeader returns NULL (which is does if the full header isn't written correctly. Here's how I'm changing the code: . The file is now truncated instead of closed/reopened. Hopefully this avoids the possibility of a scanner locking the file and the delete failing. . Added a unit test for coverage of truncation. . The file is opened in exclusive access. There is no reason why a scanner should open this file. . Added null checks. BUG=8476 TEST=none Review URL: http://codereview.chromium.org/39275 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@11262 0039d316-1c4b-4281-b951-d872f2087c98
* Run more unit tests on Linux:phajdan.jr@chromium.org2009-03-097-68/+85
| | | | | | | | | | | | | | | | - used string16 instead of wstring where needed - replaced GetTickCount calls with portable functions from base/time.h - misc GCC cleanups - enabled following unit tests on Linux: browser/autocomplete/history_contents_provider_unittest.cc browser/autocomplete/history_url_provider_unittest.cc browser/autocomplete/keyword_provider_unittest.cc browser/bookmarks/bookmark_html_writer_unittest.cc Review URL: http://codereview.chromium.org/39335 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@11249 0039d316-1c4b-4281-b951-d872f2087c98
* NO CODE CHANGE.maruel@google.com2009-03-051-1/+2
| | | | | | | Split the lines >80 cols. (Part 1) Review URL: http://codereview.chromium.org/39206 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@11032 0039d316-1c4b-4281-b951-d872f2087c98
* Fixes CRLF and trailing white spaces.maruel@chromium.org2009-03-054-4/+4
| | | | git-svn-id: svn://svn.chromium.org/chrome/trunk/src@10982 0039d316-1c4b-4281-b951-d872f2087c98
* Fix 16/wide build bustange on non-Windows.brettw@chromium.org2009-03-041-1/+1
| | | | | | Review URL: http://codereview.chromium.org/39116 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@10876 0039d316-1c4b-4281-b951-d872f2087c98
* Fix the build with some forgotten string conversions on non-Windows.brettw@chromium.org2009-03-041-1/+2
| | | | | | Review URL: http://codereview.chromium.org/40099 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@10875 0039d316-1c4b-4281-b951-d872f2087c98
* Convert NavigationEntry title to string16. TabContents::GetTitle no longer needsbrettw@chromium.org2009-03-041-1/+1
| | | | | | | | | | | | | | | to be virtual, either. This also changes how the display URL is computed. Instead of doing it preemptively, we now do so lazily. This allows us to do the URL formatting correctly using the elider so that we can do IDN and unescaping. I changed string_util's singleton functions. I was worried that other code might make a singleton of string, which would give you this same value as a non-const string. This would mean our empty strings might no longer be empty. Review URL: http://codereview.chromium.org/39022 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@10872 0039d316-1c4b-4281-b951-d872f2087c98
* This CL addresses several issues with focus in application mode:jcampan@chromium.org2009-02-261-2/+2
| | | | | | | | | | | | | - when started, the focus was not on the page (it was on the location bar, which is not shown) - ALT-F4 would not work at that point since the location bar was focused but not showing - since the location bar was focusable, tabbing through would focus it (causing the focus to go to the top window). BUG=8124,6046,8126 TEST=See bugs. R=sky Review URL: http://codereview.chromium.org/28202 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@10504 0039d316-1c4b-4281-b951-d872f2087c98
* Relanding the following:jcampan@chromium.org2009-02-261-0/+3
| | | | | | | | | | | | | | When restoring a session, the browser is shown after a tab is selected causing the focus to be on the location bar (not tab contents for web pages). This CL ensures the tab decides where the focus should be after the browser is shown. BUG=6000 TEST=See bug R=sky Review URL: http://codereview.chromium.org/28156 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@10488 0039d316-1c4b-4281-b951-d872f2087c98