summaryrefslogtreecommitdiffstats
path: root/chrome/browser/tab_contents
diff options
context:
space:
mode:
Diffstat (limited to 'chrome/browser/tab_contents')
-rw-r--r--chrome/browser/tab_contents/render_view_context_menu.cc8
-rw-r--r--chrome/browser/tab_contents/tab_contents.h4
-rw-r--r--chrome/browser/tab_contents/tab_contents_delegate.h4
-rw-r--r--chrome/browser/tab_contents/tab_contents_factory.cc13
-rw-r--r--chrome/browser/tab_contents/web_contents.cc11
-rw-r--r--chrome/browser/tab_contents/web_contents.h1
-rw-r--r--chrome/browser/tab_contents/web_contents_view.cc2
7 files changed, 10 insertions, 33 deletions
diff --git a/chrome/browser/tab_contents/render_view_context_menu.cc b/chrome/browser/tab_contents/render_view_context_menu.cc
index 979d7e5..81b87a9 100644
--- a/chrome/browser/tab_contents/render_view_context_menu.cc
+++ b/chrome/browser/tab_contents/render_view_context_menu.cc
@@ -578,14 +578,14 @@ bool RenderViewContextMenu::IsDevCommandEnabled(int id) const {
if (!active_entry)
return false;
- // Don't inspect HTML dialogs.
- if (source_web_contents_->type() == TAB_CONTENTS_HTML_DIALOG)
- return false;
-
// Don't inspect view source.
if (active_entry->IsViewSourceMode())
return false;
+ // Don't inspect HTML dialogs (doesn't work anyway).
+ if (active_entry->url().SchemeIs(chrome::kGearsScheme))
+ return false;
+
// Don't inspect inspector, new tab UI, etc.
if (active_entry->url().SchemeIs(chrome::kChromeUIScheme))
return false;
diff --git a/chrome/browser/tab_contents/tab_contents.h b/chrome/browser/tab_contents/tab_contents.h
index 3188b7c..b20c3e3 100644
--- a/chrome/browser/tab_contents/tab_contents.h
+++ b/chrome/browser/tab_contents/tab_contents.h
@@ -363,10 +363,6 @@ class TabContents : public PageNavigator,
return GetNativeView();
}
- // Tell the subclass to set up the view (e.g. create the container HWND if
- // applicable) and any other create-time setup.
- virtual void CreateView() {}
-
// Returns the NativeView associated with this TabContents. Outside of
// automation in the context of the UI, this is required to be implemented.
virtual gfx::NativeView GetNativeView() const { return NULL; }
diff --git a/chrome/browser/tab_contents/tab_contents_delegate.h b/chrome/browser/tab_contents/tab_contents_delegate.h
index b7b0825..19cc4ec 100644
--- a/chrome/browser/tab_contents/tab_contents_delegate.h
+++ b/chrome/browser/tab_contents/tab_contents_delegate.h
@@ -11,7 +11,7 @@
#include "chrome/common/navigation_types.h"
class TabContents;
-class HtmlDialogContentsDelegate;
+class HtmlDialogUIDelegate;
// Objects implement this interface to get notified about changes in the
// TabContents and to provide necessary functionality.
@@ -123,7 +123,7 @@ class TabContentsDelegate : public PageNavigator {
// delegate who knows how to display the dialog (which file URL and JSON
// string input to use during initialization). |parent_window| is the window
// that should be parent of the dialog, or NULL for the default.
- virtual void ShowHtmlDialog(HtmlDialogContentsDelegate* delegate,
+ virtual void ShowHtmlDialog(HtmlDialogUIDelegate* delegate,
void* parent_window) { }
// Tells us that we've finished firing this tab's beforeunload event.
diff --git a/chrome/browser/tab_contents/tab_contents_factory.cc b/chrome/browser/tab_contents/tab_contents_factory.cc
index 034ea60..b7ef10e 100644
--- a/chrome/browser/tab_contents/tab_contents_factory.cc
+++ b/chrome/browser/tab_contents/tab_contents_factory.cc
@@ -16,7 +16,6 @@
#if defined(OS_WIN)
// TODO(port): port these headers to posix.
-#include "chrome/browser/dom_ui/html_dialog_contents.h"
#include "chrome/browser/tab_contents/tab_contents.h"
#elif defined(OS_POSIX)
#include "chrome/common/temp_scaffolding_stubs.h"
@@ -48,12 +47,6 @@ TabContents* TabContents::CreateWithType(TabContentsType type,
contents = new WebContents(profile, instance, NULL, MSG_ROUTING_NONE,
NULL);
break;
-#if defined(OS_WIN)
- // TODO(brettw) This extra tab contents type should be deleted.
- case TAB_CONTENTS_HTML_DIALOG:
- contents = new HtmlDialogContents(profile, instance, NULL);
- break;
-#endif // defined(OS_WIN)
default:
if (g_extra_types) {
TabContentsFactoryMap::const_iterator it = g_extra_types->find(type);
@@ -66,9 +59,6 @@ TabContents* TabContents::CreateWithType(TabContentsType type,
contents = NULL;
}
- if (contents)
- contents->CreateView();
-
return contents;
}
@@ -93,9 +83,6 @@ TabContentsType TabContents::TypeForURL(GURL* url) {
if (BrowserURLHandler::HandleBrowserURL(url, &type))
return type;
- if (HtmlDialogContents::IsHtmlDialogUrl(*url))
- return TAB_CONTENTS_HTML_DIALOG;
-
#elif defined(OS_POSIX)
TabContentsType type(TAB_CONTENTS_UNKNOWN_TYPE);
if (BrowserURLHandler::HandleBrowserURL(url, &type)) {
diff --git a/chrome/browser/tab_contents/web_contents.cc b/chrome/browser/tab_contents/web_contents.cc
index 5e1d3bb..c4746a1 100644
--- a/chrome/browser/tab_contents/web_contents.cc
+++ b/chrome/browser/tab_contents/web_contents.cc
@@ -217,6 +217,8 @@ WebContents::WebContents(Profile* profile,
render_manager_.Init(profile, site_instance, routing_id, modal_dialog_event);
+ view_->CreateView();
+
// Register for notifications about all interested prefs change.
PrefService* prefs = profile->GetPrefs();
if (prefs) {
@@ -558,11 +560,6 @@ bool WebContents::FocusLocationBarByDefault() {
return false;
}
-// Stupid view pass-throughs
-void WebContents::CreateView() {
- view_->CreateView();
-}
-
gfx::NativeView WebContents::GetNativeView() const {
return view_->GetNativeView();
}
@@ -1200,7 +1197,7 @@ void WebContents::ShowModalHTMLDialog(const GURL& url, int width, int height,
const std::string& json_arguments,
IPC::Message* reply_msg) {
if (delegate()) {
- ModalHtmlDialogDelegate* dialog_delegate =
+ HtmlDialogUIDelegate* dialog_delegate =
new ModalHtmlDialogDelegate(url, width, height, json_arguments,
reply_msg, this);
delegate()->ShowHtmlDialog(dialog_delegate, NULL);
@@ -2021,7 +2018,7 @@ DOMUI* WebContents::GetDOMUIForCurrentState() {
// - First load in first tab: no committed nav entry + pending nav entry +
// pending dom ui:
// -> Use pending DOM UI if any.
- //
+ //
// - First load in second tab: no committed nav entry + pending nav entry +
// no pending DOM UI:
// -> Use the committed DOM UI if any.
diff --git a/chrome/browser/tab_contents/web_contents.h b/chrome/browser/tab_contents/web_contents.h
index 75984df..a6c24af 100644
--- a/chrome/browser/tab_contents/web_contents.h
+++ b/chrome/browser/tab_contents/web_contents.h
@@ -156,7 +156,6 @@ class WebContents : public TabContents,
// Retarded pass-throughs to the view.
// TODO(brettw) fix this, tab contents shouldn't have these methods, probably
// it should be killed altogether.
- virtual void CreateView();
virtual gfx::NativeView GetNativeView() const;
virtual gfx::NativeView GetContentNativeView();
virtual void GetContainerBounds(gfx::Rect *out) const;
diff --git a/chrome/browser/tab_contents/web_contents_view.cc b/chrome/browser/tab_contents/web_contents_view.cc
index e472ef4..14cb744 100644
--- a/chrome/browser/tab_contents/web_contents_view.cc
+++ b/chrome/browser/tab_contents/web_contents_view.cc
@@ -37,8 +37,6 @@ void WebContentsView::CreateNewWindow(int route_id,
new_contents->SetupController(web_contents()->profile());
WebContentsView* new_view = new_contents->view();
- new_view->CreateView();
-
// TODO(brettw) it seems bogus that we have to call this function on the
// newly created object and give it one of its own member variables.
new_view->CreateViewForWidget(new_contents->render_view_host());