summaryrefslogtreecommitdiffstats
path: root/chrome/browser/tab_contents/navigation_controller.cc
Commit message (Collapse)AuthorAgeFilesLines
* Make views/ depend only on images from app/resources.ben@chromium.org2009-05-211-0/+1
| | | | | | | | | | Trying this again. All compile issues should be addressed, ui and unit tests now pass. http://crbug.com/11387 Review URL: http://codereview.chromium.org/113690 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@16677 0039d316-1c4b-4281-b951-d872f2087c98
* Revert 16567.ben@chromium.org2009-05-211-1/+0
| | | | git-svn-id: svn://svn.chromium.org/chrome/trunk/src@16575 0039d316-1c4b-4281-b951-d872f2087c98
* views/ should use resources from app/resources. Move dependent images to ↵ben@chromium.org2009-05-211-0/+1
| | | | | | | | | this location. http://crbug.com/11387 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@16567 0039d316-1c4b-4281-b951-d872f2087c98
* Finish refactoring to make SSLPolicy and friends unit testable. Next stop: ↵abarth@chromium.org2009-05-151-1/+1
| | | | | | | | | | | tests! TBR=jcampan BUG=http://crbug.com/8782 Review URL: http://codereview.chromium.org/115389 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@16145 0039d316-1c4b-4281-b951-d872f2087c98
* This is the successor to http://codereview.chromium.org/67150maruel@chromium.org2009-05-131-10/+18
| | | | | | | | | | | | | | | | | | | | | Make forward/backward navigation work even when redirection is involved. Currently, Chrome tries to go back to the page immediately before the current one. This doesn't work if the current page was visited by redirection; redirection just occurs again. With this change, Chrome first tries to find the redirection source of the current page and then to go back to the page before the source. BUG=9663,10531 Tested: unit_tests, ui_tests, manually. Patch contributed by Yuzo Fujishima <yuzo@google.com> Review: http://codereview.chromium.org/100245 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@15950 0039d316-1c4b-4281-b951-d872f2087c98
* Adds toplevel app/ directory and moves ResourceBundle into it.ben@chromium.org2009-05-051-1/+1
| | | | | | | | | | | No changes to resource bundle yet, just the move to keep this CL as compact as possible. Adds new vcproj and gyp file for app dir. http://crbug.com/11387 Review URL: http://codereview.chromium.org/100354 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@15264 0039d316-1c4b-4281-b951-d872f2087c98
* Replace all occurrances of WebContents with TabContents.brettw@chromium.org2009-05-041-1/+1
| | | | | | Review URL: http://codereview.chromium.org/99177 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@15194 0039d316-1c4b-4281-b951-d872f2087c98
* Stop the location bar from flashing white when navigating from one HTTPS ↵abarth@chromium.org2009-05-011-2/+10
| | | | | | | | | | | site to another. To do this, we have to make sure the SSLManager sees the DidCommitProvisionalLoad event before the location bar draws itself to the screen. BUG=11157 TEST=Navigate from one HTTPS site to another and watch the location bar carefully. It shouln't flash anymore. Review URL: http://codereview.chromium.org/99247 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@15020 0039d316-1c4b-4281-b951-d872f2087c98
* Re-land my change to clean up TabContents/WebContents ownership. Thisbrettw@chromium.org2009-04-201-76/+32
| | | | | | | | | | | | | | | | | | | | | | | | 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-181-32/+76
| | | | 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-181-76/+32
| | | | | | | | | | | | | | | | | 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-151-16/+4
| | | | | | | | 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-151-33/+18
| | | | | | | 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
* Remove the TestTabContents. This makes BrowserWithTestWindow use thebrettw@chromium.org2009-04-141-253/+56
| | | | | | | | | | | | | | | 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
* Remove the DOMUIHost. It is not used by any code.brettw@chromium.org2009-04-131-3/+0
| | | | | | | This also does a minor fix for forward-declares of RenderViewHostFactory. Review URL: http://codereview.chromium.org/66046 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@13637 0039d316-1c4b-4281-b951-d872f2087c98
* Make the RenderViewHostFactory a global. This prevents us from having to passbrettw@chromium.org2009-04-071-5/+2
| | | | | | | | | a factory pointer around all the time. Removing TestTabContents will require making the Browser object keep track of the Factory pointer as well, so I think the global is the best approach and cleans some things up. Review URL: http://codereview.chromium.org/62044 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@13255 0039d316-1c4b-4281-b951-d872f2087c98
* Remove some uses of custom tab contents types from some tests.brettw@chromium.org2009-04-041-6/+6
| | | | | | | | | | | | | | | 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
* SSLPolicy fix: Step 9 of 9 (hopefully!).abarth@chromium.org2009-03-201-5/+0
| | | | | | | | | | | | Change our algorithm for computing the state of our SSL security indicators. Previously, we were computing this state for a single navigation entry. Although this matches other browsers, it fails to take the same-origin policy into account. For example, if one tab is contaminated with insecure content, that insecure content can spread to all the tabs in the same security origin. R=jcampan,wtc BUG=8706 TEST=SSLUITest.TestMixedContentsRandomizeHash,SSLUITest.TestMixedContentsTwoTabs Review URL: http://codereview.chromium.org/42314 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@12178 0039d316-1c4b-4281-b951-d872f2087c98
* Merge DOMUIContents into WebContents.brettw@chromium.org2009-03-171-1/+1
| | | | | | | I did a lot of cleanup of the DOM UI system as part of this. Review URL: http://codereview.chromium.org/42227 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@11925 0039d316-1c4b-4281-b951-d872f2087c98
* NO CODE CHANGE.maruel@google.com2009-03-051-1/+1
| | | | | | | 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
* Remove the TAB_CONTENTS_NEW_TAB_UI tab contents type. This was not actually usedbrettw@chromium.org2009-03-051-1/+0
| | | | | | | now, so everytime this appears was dead code. Review URL: http://codereview.chromium.org/39200 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@11024 0039d316-1c4b-4281-b951-d872f2087c98
* Clean up the browser about URL handler to not derive from WebContents. It isbrettw@chromium.org2009-03-041-7/+10
| | | | | | | | | | | | | | | | | | | | instead integrated in the BrowserURLHandler for special schemes. This solves a number of problems and cleans things up nicely. Most of the functions were not necessary to have in the header file of the browser about handler, so I made them local to the .cc file. I moved everything around, but there was no change to any of the About...() functions. This improves the about:memory page to not include the memory of the new tab page it replaced. The entry for itself also has the proper title. This works by using a meta refresh to the actual page, the the process transition no longer happens at the same time as the about:memory page computation. This also fixes problems with the about:network and about:ipc dialogs opening blank pages and also re-opening the dialog when you close the browser. Review URL: http://codereview.chromium.org/27238 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@10941 0039d316-1c4b-4281-b951-d872f2087c98
* Convert NavigationEntry title to string16. TabContents::GetTitle no longer needsbrettw@chromium.org2009-03-041-7/+7
| | | | | | | | | | | | | | | 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
* Fix back button behavior for DOMUI contents (or at least make it as ↵glen@chromium.org2009-03-041-0/+1
| | | | | | | | | | | not-broken as before) - I forgot to add this line to the nav controller. BUG=8212 Review URL: http://codereview.chromium.org/40076 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@10865 0039d316-1c4b-4281-b951-d872f2087c98
* Fix compilations errors introduced by revision 10712.maruel@chromium.org2009-03-021-4/+4
| | | | | | | TBR=deanm Review URL: http://codereview.chromium.org/27347 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@10721 0039d316-1c4b-4281-b951-d872f2087c98
* Refactor download shelf and prepare for porting.estade@chromium.org2009-02-281-1/+1
| | | | | | | | Side effect of removing some views dependencies from places they don't belong. Review URL: http://codereview.chromium.org/28252 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@10657 0039d316-1c4b-4281-b951-d872f2087c98
* Back out r10487 toomark@chromium.org2009-02-261-2/+1
| | | | | | Review URL: http://codereview.chromium.org/28209 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@10506 0039d316-1c4b-4281-b951-d872f2087c98
* More URL constants replacement.brettw@chromium.org2009-02-261-1/+2
| | | | | | Review URL: http://codereview.chromium.org/28170 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@10487 0039d316-1c4b-4281-b951-d872f2087c98
* Delete the ViewSourceTabContents.brettw@chromium.org2009-02-251-1/+7
| | | | | | | | | | | | | This removes all the tab contents type stuff for view source mode. The RenderViewHostManager now automatically switches RenderViews when we turn view source mode on or off to get the desired effect. I also moved some instances of hardcoded schemes into chrome_constants.h, and renamed RendererCreated/Ready/Gone to RenderViewCreated/Ready/Gone to reflect what they actually mean. Review URL: http://codereview.chromium.org/28089 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@10346 0039d316-1c4b-4281-b951-d872f2087c98
* Send over the HTTP status code in the ViewHostMsg_FrameNavigate message ↵ananta@chromium.org2009-02-191-0/+1
| | | | | | | | | | | | | | | | | coming in from the renderer. A failed HTTP navigation like a 404 response to a request is followed by two responses. The first one which is associated with the failed response. This does not send over any information about the failure to the browser and thus appears as a normal navigation.The second response is for the actual 404 page being loaded. For network errors the browser does get notified via RenderView::DidFailProvisionalLoadWithError. However due to a prototype mismatch the corresponding function in WebContents is never invoked. Added a new automation message AutomationMsg_NavigationFailed, which carries information about failed navigations to automation clients.The changes to the navigation controller include sending over the http status code and the URL to observers. The ExternalTabContainer also subscribes to the FAIL_PROVISIONAL_LOAD_WITH_ERROR notification, so it can inform clients about errors. We also ignore the next NAV_ENTRY_COMMITTED notification after an error due to the reasons mentioned above. Review URL: http://codereview.chromium.org/21495 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@10023 0039d316-1c4b-4281-b951-d872f2087c98
* Add the referrer value to the new NavigationEntry.paulg@google.com2009-02-181-0/+1
| | | | | | Review URL: http://codereview.chromium.org/21464 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@9968 0039d316-1c4b-4281-b951-d872f2087c98
* Fix the build from my previous file move.brettw@chromium.org2009-02-051-1/+1
| | | | | | Review URL: http://codereview.chromium.org/20096 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@9243 0039d316-1c4b-4281-b951-d872f2087c98
* Move resource_message_filter and resource_request_details to the renderer_host.brettw@chromium.org2009-02-051-3/+4
| | | | | | | | | | Make the repost form warning portable by abstracting the show function from the view. Rename the Windows repost form warning and move it to browser/views. This also fixes a comment in browser_process.h Review URL: http://codereview.chromium.org/20066 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@9242 0039d316-1c4b-4281-b951-d872f2087c98
* Add in NavigationController to linux and mac. pinkerton@chromium.org2009-02-051-4/+7
| | | | | | Review URL: http://codereview.chromium.org/21064 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@9226 0039d316-1c4b-4281-b951-d872f2087c98
* Finish taking out render_messages.h includes from headers.jam@chromium.org2009-02-051-0/+1
| | | | | | Review URL: http://codereview.chromium.org/20072 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@9209 0039d316-1c4b-4281-b951-d872f2087c98
* Fix a bunch of header includes. I removed some unnecessary headers from abrettw@chromium.org2009-02-011-5/+0
| | | | | | | | variety of places and added ones in other files that were accidentally depending on them. Review URL: http://codereview.chromium.org/19742 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@9022 0039d316-1c4b-4281-b951-d872f2087c98
* Remove most header file dependencies on the notification type list. It isbrettw@chromium.org2009-02-011-8/+10
| | | | | | | | | | | really painful to add more types, since lots of headers include the notification service to derive from the notification observer. This splits that out, so much less of the project should end up including notification_types.h ---Paths modified but not in any changelist: Review URL: http://codereview.chromium.org/19744 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@9020 0039d316-1c4b-4281-b951-d872f2087c98
* A crasher would happen if you navigate to a page triggering an interstitial ↵jcampan@chromium.org2009-01-211-11/+2
| | | | | | | | | | | | | | | from the new tab page, then press back in the interstitial. The crasher would happen because the navigation controller collects (destroys) the previous tab contents when a navigation is initiated. In this case, when navigating back (by just discarding the non committed entries), it would not be expect that the tab contents would be NULL. It seems we do not need to collect the unused tab contents on NavigateToPendingEntry() since we are collecting any unused TabContents in NavigationController::RendererDidNavigate(). BUG=6408 TEST=From the new page, enter the URL to a malware site (ex: http://ianfette.org), press Back (or close the tab), there should be no crash. Review URL: http://codereview.chromium.org/18433 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@8350 0039d316-1c4b-4281-b951-d872f2087c98
* Move a bunch of TabContents related files into a tab_contents subdirben@chromium.org2009-01-151-0/+1233
Review URL: http://codereview.chromium.org/18250 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@8058 0039d316-1c4b-4281-b951-d872f2087c98