summaryrefslogtreecommitdiffstats
path: root/chrome/browser/tab_contents/tab_contents.h
diff options
context:
space:
mode:
authorananta@chromium.org <ananta@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-11-17 00:12:52 +0000
committerananta@chromium.org <ananta@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-11-17 00:12:52 +0000
commit1a98a93fc1977683c3789dedbef2806b3fcdf5b4 (patch)
tree4a8b6aa1e55e0d2d93e9f646f3bdde3aaa98cab4 /chrome/browser/tab_contents/tab_contents.h
parentf09d9379d6e654e7fd95b9d601b1e77f1ac13c3d (diff)
downloadchromium_src-1a98a93fc1977683c3789dedbef2806b3fcdf5b4.zip
chromium_src-1a98a93fc1977683c3789dedbef2806b3fcdf5b4.tar.gz
chromium_src-1a98a93fc1977683c3789dedbef2806b3fcdf5b4.tar.bz2
amit, please review everything, jam please review the changes to the tab_contents and the
renderer_host sources. Remove the AutomationProfileImpl class which wraps the Chrome profile for an external tab container, which hosts ChromeFrame. This object was used to carry a custom URL request context which was used to intercept HTTP requests and cookie requests issued by external tabs. However as the life time of the automation profile class depended on the lifetime of the external tab container object this caused a number of crashes in objects which held on to the automation profile pointer retrieved from the associated tab contents. This does not happen in a regualar Chrome browser instance as the profile is deleted at the very end. We can associate the automation URL request context with the underlying tab_contents which would eventually percolate down to the resource message filter. Doing this would avoid the need for the AutomationProfile class. This CL achieves that. Bug=27695,27662 Review URL: http://codereview.chromium.org/385117 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@32127 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/tab_contents/tab_contents.h')
-rw-r--r--chrome/browser/tab_contents/tab_contents.h15
1 files changed, 15 insertions, 0 deletions
diff --git a/chrome/browser/tab_contents/tab_contents.h b/chrome/browser/tab_contents/tab_contents.h
index ee25ef3..b8e84a7 100644
--- a/chrome/browser/tab_contents/tab_contents.h
+++ b/chrome/browser/tab_contents/tab_contents.h
@@ -23,6 +23,7 @@
#include "chrome/browser/fav_icon_helper.h"
#include "chrome/browser/find_notification_details.h"
#include "chrome/browser/jsmessage_box_client.h"
+#include "chrome/browser/net/url_request_context_getter.h"
#include "chrome/browser/shell_dialogs.h"
#include "chrome/browser/renderer_host/render_view_host_delegate.h"
#include "chrome/browser/tab_contents/constrained_window.h"
@@ -622,6 +623,15 @@ class TabContents : public PageNavigator,
// times, subsequent calls are ignored.
void OnCloseStarted();
+ // Getter/Setters for the url request context to be used for this tab.
+ void set_request_context(URLRequestContextGetter* context) {
+ request_context_ = context;
+ }
+
+ URLRequestContextGetter* request_context() const {
+ return request_context_;
+ }
+
private:
friend class NavigationController;
// Used to access the child_windows_ (ConstrainedWindowList) for testing
@@ -1179,6 +1189,11 @@ class TabContents : public PageNavigator,
// The time that we started to close the tab.
base::TimeTicks tab_close_start_time_;
+ // Contextual information to be used for requests created here.
+ // Can be NULL in which case we defer to the request context from the
+ // profile
+ scoped_refptr<URLRequestContextGetter> request_context_;
+
// ---------------------------------------------------------------------------
DISALLOW_COPY_AND_ASSIGN(TabContents);