Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "chrome/browser/tab_contents/tab_contents_view.h" | 5 #include "chrome/browser/tab_contents/tab_contents_view.h" |
| 6 | 6 |
| 7 #include "chrome/browser/renderer_host/render_process_host.h" | 7 #include "chrome/browser/renderer_host/render_process_host.h" |
| 8 #include "chrome/browser/renderer_host/render_view_host.h" | 8 #include "chrome/browser/renderer_host/render_view_host.h" |
| 9 #include "chrome/browser/renderer_host/render_widget_host.h" | 9 #include "chrome/browser/renderer_host/render_widget_host.h" |
| 10 #include "chrome/browser/renderer_host/render_view_host_delegate.h" | 10 #include "chrome/browser/renderer_host/render_view_host_delegate.h" |
| (...skipping 10 matching lines...) Expand all Loading... | |
| 21 host->view()->WillDestroyRenderWidget(host); | 21 host->view()->WillDestroyRenderWidget(host); |
| 22 delegate_view_helper_.RenderWidgetHostDestroyed(host); | 22 delegate_view_helper_.RenderWidgetHostDestroyed(host); |
| 23 } | 23 } |
| 24 | 24 |
| 25 void TabContentsView::RenderViewCreated(RenderViewHost* host) { | 25 void TabContentsView::RenderViewCreated(RenderViewHost* host) { |
| 26 // Default implementation does nothing. Platforms may override. | 26 // Default implementation does nothing. Platforms may override. |
| 27 } | 27 } |
| 28 | 28 |
| 29 void TabContentsView::CreateNewWindow( | 29 void TabContentsView::CreateNewWindow( |
| 30 int route_id, | 30 int route_id, |
| 31 WindowContainerType window_container_type) { | 31 WindowContainerType window_container_type, |
| 32 const string16& frame_name) { | |
| 32 TabContents* new_contents = delegate_view_helper_.CreateNewWindow( | 33 TabContents* new_contents = delegate_view_helper_.CreateNewWindow( |
| 33 route_id, tab_contents_->profile(), tab_contents_->GetSiteInstance(), | 34 route_id, tab_contents_->profile(), tab_contents_->GetSiteInstance(), |
|
rafaelw
2010/06/10 22:48:05
stack args, one per line.
| |
| 34 DOMUIFactory::GetDOMUIType(tab_contents_->GetURL()), tab_contents_, | 35 DOMUIFactory::GetDOMUIType(tab_contents_->GetURL()), tab_contents_, |
| 35 window_container_type); | 36 window_container_type, frame_name); |
| 36 | 37 |
| 37 if (new_contents && tab_contents_->delegate()) | 38 if (new_contents && tab_contents_->delegate()) |
| 38 tab_contents_->delegate()->TabContentsCreated(new_contents); | 39 tab_contents_->delegate()->TabContentsCreated(new_contents); |
| 39 } | 40 } |
| 40 | 41 |
| 41 void TabContentsView::CreateNewWidget(int route_id, | 42 void TabContentsView::CreateNewWidget(int route_id, |
| 42 WebKit::WebPopupType popup_type) { | 43 WebKit::WebPopupType popup_type) { |
| 43 CreateNewWidgetInternal(route_id, popup_type); | 44 CreateNewWidgetInternal(route_id, popup_type); |
| 44 } | 45 } |
| 45 | 46 |
| (...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 86 | 87 |
| 87 void TabContentsView::ShowCreatedWidgetInternal( | 88 void TabContentsView::ShowCreatedWidgetInternal( |
| 88 RenderWidgetHostView* widget_host_view, const gfx::Rect& initial_pos) { | 89 RenderWidgetHostView* widget_host_view, const gfx::Rect& initial_pos) { |
| 89 if (tab_contents_->delegate()) | 90 if (tab_contents_->delegate()) |
| 90 tab_contents_->delegate()->RenderWidgetShowing(); | 91 tab_contents_->delegate()->RenderWidgetShowing(); |
| 91 | 92 |
| 92 widget_host_view->InitAsPopup(tab_contents_->GetRenderWidgetHostView(), | 93 widget_host_view->InitAsPopup(tab_contents_->GetRenderWidgetHostView(), |
| 93 initial_pos); | 94 initial_pos); |
| 94 widget_host_view->GetRenderWidgetHost()->Init(); | 95 widget_host_view->GetRenderWidgetHost()->Init(); |
| 95 } | 96 } |
| OLD | NEW |