diff options
author | avi@chromium.org <avi@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-02-24 18:47:49 +0000 |
---|---|---|
committer | avi@chromium.org <avi@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-02-24 18:47:49 +0000 |
commit | a6de5c194608f8f759a001361a223f9fd75a87a0 (patch) | |
tree | 61150e4ad27b20efb8e37f9d2e49bd0515f6c5c3 /chrome/browser/tab_contents | |
parent | 5c255c73128dba206e9f2101e00ed73df09a70ee (diff) | |
download | chromium_src-a6de5c194608f8f759a001361a223f9fd75a87a0.zip chromium_src-a6de5c194608f8f759a001361a223f9fd75a87a0.tar.gz chromium_src-a6de5c194608f8f759a001361a223f9fd75a87a0.tar.bz2 |
Taking out unfinished code. I don't understand what role these functions play, and I put in quickly-ported Windows code. It crashes, so I'm taking it out until I can properly write it.
Review URL: http://codereview.chromium.org/31005
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@10273 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/tab_contents')
-rw-r--r-- | chrome/browser/tab_contents/web_contents_view_mac.mm | 60 |
1 files changed, 14 insertions, 46 deletions
diff --git a/chrome/browser/tab_contents/web_contents_view_mac.mm b/chrome/browser/tab_contents/web_contents_view_mac.mm index ba80b54..c784ee0 100644 --- a/chrome/browser/tab_contents/web_contents_view_mac.mm +++ b/chrome/browser/tab_contents/web_contents_view_mac.mm @@ -170,38 +170,19 @@ void WebContentsViewMac::ShowContextMenu(const ContextMenuParams& params) { WebContents* WebContentsViewMac::CreateNewWindowInternal( int route_id, base::WaitableEvent* modal_dialog_event) { - // Create the new web contents. This will automatically create the new - // WebContentsView. In the future, we may want to create the view separately. - WebContents* new_contents = - new WebContents(web_contents_->profile(), - web_contents_->GetSiteInstance(), - web_contents_->render_view_factory_, - route_id, - modal_dialog_event); - 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()); - return new_contents; + // I don't understand what role this plays in the grand scheme of things. I'm + // not going to fake it. + NOTIMPLEMENTED(); + return NULL; } RenderWidgetHostView* WebContentsViewMac::CreateNewWidgetInternal( int route_id, bool activatable) { - // Create the widget and its associated view. - // TODO(brettw) can widget creation be cross-platform? - RenderWidgetHost* widget_host = - new RenderWidgetHost(web_contents_->process(), route_id); - RenderWidgetHostViewMac* widget_view = - new RenderWidgetHostViewMac(widget_host); - - // Some weird reparenting stuff happens here. TODO(avi): figure that out - - return widget_view; + // I don't understand what role this plays in the grand scheme of things. I'm + // not going to fake it. + NOTIMPLEMENTED(); + return NULL; } void WebContentsViewMac::ShowCreatedWindowInternal( @@ -209,30 +190,17 @@ void WebContentsViewMac::ShowCreatedWindowInternal( WindowOpenDisposition disposition, const gfx::Rect& initial_pos, bool user_gesture) { - if (!new_web_contents->render_widget_host_view() || - !new_web_contents->process()->channel()) { - // The view has gone away or the renderer crashed. Nothing to do. - return; - } - - // TODO(brettw) this seems bogus to reach into here and initialize the host. - new_web_contents->render_view_host()->Init(); - web_contents_->AddNewContents(new_web_contents, disposition, initial_pos, - user_gesture); + // I don't understand what role this plays in the grand scheme of things. I'm + // not going to fake it. + NOTIMPLEMENTED(); } void WebContentsViewMac::ShowCreatedWidgetInternal( RenderWidgetHostView* widget_host_view, const gfx::Rect& initial_pos) { - RenderWidgetHost* widget_host = widget_host_view->GetRenderWidgetHost(); - if (!widget_host->process()->channel()) { - // The view has gone away or the renderer crashed. Nothing to do. - return; - } - - // Reparenting magic goes here. TODO(avi): fix - - widget_host->Init(); + // I don't understand what role this plays in the grand scheme of things. I'm + // not going to fake it. + NOTIMPLEMENTED(); } void WebContentsViewMac::Observe(NotificationType type, |