summaryrefslogtreecommitdiffstats
path: root/chrome/browser/tab_contents
diff options
context:
space:
mode:
authorkuchhal@chromium.org <kuchhal@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-02-10 22:07:09 +0000
committerkuchhal@chromium.org <kuchhal@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-02-10 22:07:09 +0000
commit6ecc60e234224d61cb6a5157ebbc65448e66b716 (patch)
tree2cac2b706a1ea69febdc4060d5f25f54eee4a0ae /chrome/browser/tab_contents
parent4f425554e926abb988a4949f8e93e1b0ddd1bc5f (diff)
downloadchromium_src-6ecc60e234224d61cb6a5157ebbc65448e66b716.zip
chromium_src-6ecc60e234224d61cb6a5157ebbc65448e66b716.tar.gz
chromium_src-6ecc60e234224d61cb6a5157ebbc65448e66b716.tar.bz2
Reverting 9493.
Review URL: http://codereview.chromium.org/21231 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@9517 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/tab_contents')
-rw-r--r--chrome/browser/tab_contents/tab_contents.h4
-rw-r--r--chrome/browser/tab_contents/tab_contents_delegate.h23
-rw-r--r--chrome/browser/tab_contents/web_contents.cc33
-rw-r--r--chrome/browser/tab_contents/web_contents.h7
4 files changed, 31 insertions, 36 deletions
diff --git a/chrome/browser/tab_contents/tab_contents.h b/chrome/browser/tab_contents/tab_contents.h
index 59ad1ae..cf6b1ab 100644
--- a/chrome/browser/tab_contents/tab_contents.h
+++ b/chrome/browser/tab_contents/tab_contents.h
@@ -400,7 +400,7 @@ class TabContents : public PageNavigator,
// Removes the InfoBar for the specified |delegate|.
void RemoveInfoBar(InfoBarDelegate* delegate);
-
+
// Enumeration and access functions.
int infobar_delegate_count() const { return infobar_delegates_.size(); }
InfoBarDelegate* GetInfoBarDelegateAt(int index) {
@@ -408,7 +408,7 @@ class TabContents : public PageNavigator,
}
// Toolbars and such ---------------------------------------------------------
-
+
// Returns whether the bookmark bar should be visible.
virtual bool IsBookmarkBarAlwaysVisible() { return false; }
diff --git a/chrome/browser/tab_contents/tab_contents_delegate.h b/chrome/browser/tab_contents/tab_contents_delegate.h
index 05f5e79..428f98e 100644
--- a/chrome/browser/tab_contents/tab_contents_delegate.h
+++ b/chrome/browser/tab_contents/tab_contents_delegate.h
@@ -6,10 +6,14 @@
#define CHROME_BROWSER_TAB_CONTENTS_TAB_CONTENTS_DELEGATE_H_
#include "base/basictypes.h"
-#include "base/gfx/rect.h"
#include "chrome/browser/tab_contents/page_navigator.h"
#include "chrome/common/navigation_types.h"
+namespace gfx {
+class Point;
+class Rect;
+}
+
class TabContents;
class HtmlDialogContentsDelegate;
@@ -26,7 +30,8 @@ class TabContentsDelegate : public PageNavigator {
virtual void OpenURL(const GURL& url, const GURL& referrer,
WindowOpenDisposition disposition,
- PageTransition::Type transition) {
+ PageTransition::Type transition)
+ {
OpenURLFromTab(NULL, url, referrer, disposition, transition);
}
@@ -101,7 +106,7 @@ class TabContentsDelegate : public PageNavigator {
// a WebContents with a valid WebApp set.
virtual void ConvertContentsToApplication(TabContents* source) { }
- // Informs the TabContentsDelegate that some of our state has changed
+ // Informs the TabContentsDelegate that some of our state has changed
// for this tab.
virtual void ContentsStateChanged(TabContents* source) {}
@@ -114,10 +119,6 @@ class TabContentsDelegate : public PageNavigator {
// call. ConstrainedWindows shouldn't be able to be blurred.
virtual bool CanBlur() const { return true; }
- // Return the rect where to display the resize corner, if any, otherwise
- // an empty rect.
- virtual gfx::Rect GetRootWindowResizerRect() const { return gfx::Rect(); }
-
// Show a dialog with HTML content. |delegate| contains a pointer to the
// delegate who knows how to display the dialog (which file URL and JSON
// string input to use during initialization). |parent_window| is the window
@@ -128,17 +129,17 @@ class TabContentsDelegate : public PageNavigator {
// Tells us that we've finished firing this tab's beforeunload event.
// The proceed bool tells us whether the user chose to proceed closing the
// tab. Returns true if the tab can continue on firing it's unload event.
- // If we're closing the entire browser, then we'll want to delay firing
+ // If we're closing the entire browser, then we'll want to delay firing
// unload events until all the beforeunload events have fired.
virtual void BeforeUnloadFired(TabContents* tab,
- bool proceed,
- bool* proceed_to_fire_unload) {
+ bool proceed,
+ bool* proceed_to_fire_unload) {
*proceed_to_fire_unload = true;
}
// Send IPC to external host. Default implementation is do nothing.
virtual void ForwardMessageToExternalHost(const std::string& receiver,
- const std::string& message) {}
+ const std::string& message) {};
// If the delegate is hosting tabs externally.
virtual bool IsExternalTabContainer() const { return false; }
diff --git a/chrome/browser/tab_contents/web_contents.cc b/chrome/browser/tab_contents/web_contents.cc
index 6df85ac..1670493 100644
--- a/chrome/browser/tab_contents/web_contents.cc
+++ b/chrome/browser/tab_contents/web_contents.cc
@@ -394,7 +394,7 @@ bool WebContents::NavigateToPendingEntry(bool reload) {
}
// Clear any provisional password saves - this stops password infobars
- // showing up on pages the user navigates to while the right page is
+ // showing up on pages the user navigates to while the right page is
// loading.
GetPasswordManager()->ClearProvisionalSave();
@@ -422,7 +422,7 @@ void WebContents::Copy() {
}
void WebContents::Paste() {
- render_view_host()->Paste();
+ render_view_host()->Paste();
}
void WebContents::DisassociateFromPopupCount() {
@@ -603,7 +603,7 @@ bool WebContents::IsActiveEntry(int32 page_id) {
}
void WebContents::SetInitialFocus(bool reverse) {
- render_view_host()->SetInitialFocus(reverse);
+ render_view_host()->SetInitialFocus(reverse);
}
// Notifies the RenderWidgetHost instance about the fact that the page is
@@ -670,20 +670,20 @@ void WebContents::DidNavigate(RenderViewHost* rvh,
// We can't do anything about navigations when we're inactive.
if (!controller() || !is_active())
- return;
+ return;
// Update the site of the SiteInstance if it doesn't have one yet.
if (!GetSiteInstance()->has_site())
GetSiteInstance()->SetSite(params.url);
- // Need to update MIME type here because it's referred to in
+ // Need to update MIME type here because it's referred to in
// UpdateNavigationCommands() called by RendererDidNavigate() to
- // determine whether or not to enable the encoding menu.
- // It's updated only for the main frame. For a subframe,
+ // determine whether or not to enable the encoding menu.
+ // It's updated only for the main frame. For a subframe,
// RenderView::UpdateURL does not set params.contents_mime_type.
// (see http://code.google.com/p/chromium/issues/detail?id=2929 )
- // TODO(jungshik): Add a test for the encoding menu to avoid
- // regressing it again.
+ // TODO(jungshik): Add a test for the encoding menu to avoid
+ // regressing it again.
if (PageTransition::IsMainFrame(params.transition))
contents_mime_type_ = params.contents_mime_type;
@@ -1049,7 +1049,7 @@ void WebContents::AutofillFormSubmitted(
GetAutofillManager()->AutofillFormSubmitted(form);
}
-void WebContents::GetAutofillSuggestions(const std::wstring& field_name,
+void WebContents::GetAutofillSuggestions(const std::wstring& field_name,
const std::wstring& user_text, int64 node_id, int request_id) {
GetAutofillManager()->FetchValuesForName(field_name, user_text,
kMaxAutofillMenuItems, node_id, request_id);
@@ -1278,21 +1278,16 @@ bool WebContents::CanBlur() const {
return delegate() ? delegate()->CanBlur() : true;
}
-gfx::Rect WebContents::GetRootWindowResizerRect() const {
- if (delegate())
- return delegate()->GetRootWindowResizerRect();
- return gfx::Rect();
-}
-
-void WebContents::RendererUnresponsive(RenderViewHost* rvh,
+void WebContents::RendererUnresponsive(RenderViewHost* rvh,
bool is_during_unload) {
if (is_during_unload) {
// Hang occurred while firing the beforeunload/unload handler.
// Pretend the handler fired so tab closing continues as if it had.
rvh->UnloadListenerHasFired();
- if (!render_manager_.ShouldCloseTabOnUnresponsiveRenderer())
+ if (!render_manager_.ShouldCloseTabOnUnresponsiveRenderer()) {
return;
+ }
// If the tab hangs in the beforeunload/unload handler there's really
// nothing we can do to recover. Pretend the unload listeners have
@@ -1657,7 +1652,7 @@ bool WebContents::UpdateTitleForEntry(NavigationEntry* entry,
profile()->GetHistoryService(Profile::IMPLICIT_ACCESS);
if (hs)
hs->SetPageTitle(entry->display_url(), final_title);
-
+
// Don't allow the title to be saved again for explicitly set ones.
received_page_title_ = explicit_set;
}
diff --git a/chrome/browser/tab_contents/web_contents.h b/chrome/browser/tab_contents/web_contents.h
index bd1c2ce..7bb858c 100644
--- a/chrome/browser/tab_contents/web_contents.h
+++ b/chrome/browser/tab_contents/web_contents.h
@@ -212,7 +212,7 @@ class WebContents : public TabContents,
// Override the encoding and reload the page by sending down
// ViewMsg_SetPageEncoding to the renderer. |UpdateEncoding| is kinda
- // the opposite of this, by which 'browser' is notified of
+ // the opposite of this, by which 'browser' is notified of
// the encoding of the current tab from 'renderer' (determined by
// auto-detect, http header, meta, bom detection, etc).
void override_encoding(const std::wstring& encoding) {
@@ -306,7 +306,7 @@ class WebContents : public TabContents,
IPC::Message* reply_msg);
virtual void PasswordFormsSeen(const std::vector<PasswordForm>& forms);
virtual void AutofillFormSubmitted(const AutofillForm& form);
- virtual void GetAutofillSuggestions(const std::wstring& field_name,
+ virtual void GetAutofillSuggestions(const std::wstring& field_name,
const std::wstring& user_text, int64 node_id, int request_id);
virtual void PageHasOSDD(RenderViewHost* render_view_host,
int32 page_id, const GURL& url, bool autodetected);
@@ -330,8 +330,7 @@ class WebContents : public TabContents,
new_request_id);
}
virtual bool CanBlur() const;
- virtual gfx::Rect GetRootWindowResizerRect() const;
- virtual void RendererUnresponsive(RenderViewHost* render_view_host,
+ virtual void RendererUnresponsive(RenderViewHost* render_view_host,
bool is_during_unload);
virtual void RendererResponsive(RenderViewHost* render_view_host);
virtual void LoadStateChanged(const GURL& url, net::LoadState load_state);