| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 "content/browser/tab_contents/tab_contents.h" | 5 #include "content/browser/tab_contents/tab_contents.h" |
| 6 | 6 |
| 7 #include <utility> | 7 #include <utility> |
| 8 | 8 |
| 9 #include "base/command_line.h" | 9 #include "base/command_line.h" |
| 10 #include "base/metrics/histogram.h" | 10 #include "base/metrics/histogram.h" |
| (...skipping 285 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 296 | 296 |
| 297 // We have the initial size of the view be based on the size of the passed in | 297 // We have the initial size of the view be based on the size of the passed in |
| 298 // tab contents (normally a tab from the same window). | 298 // tab contents (normally a tab from the same window). |
| 299 view_->CreateView(base_tab_contents ? | 299 view_->CreateView(base_tab_contents ? |
| 300 base_tab_contents->GetView()->GetContainerSize() : gfx::Size()); | 300 base_tab_contents->GetView()->GetContainerSize() : gfx::Size()); |
| 301 | 301 |
| 302 #if defined(ENABLE_JAVA_BRIDGE) | 302 #if defined(ENABLE_JAVA_BRIDGE) |
| 303 java_bridge_dispatcher_host_manager_.reset( | 303 java_bridge_dispatcher_host_manager_.reset( |
| 304 new JavaBridgeDispatcherHostManager(this)); | 304 new JavaBridgeDispatcherHostManager(this)); |
| 305 #endif | 305 #endif |
| 306 |
| 307 browser_plugin_web_contents_observer_.reset( |
| 308 content::BrowserPluginWebContentsObserver::Get(this)); |
| 306 } | 309 } |
| 307 | 310 |
| 308 TabContents::~TabContents() { | 311 TabContents::~TabContents() { |
| 309 is_being_destroyed_ = true; | 312 is_being_destroyed_ = true; |
| 310 | 313 |
| 311 // Clear out any JavaScript state. | 314 // Clear out any JavaScript state. |
| 312 if (dialog_creator_) | 315 if (dialog_creator_) |
| 313 dialog_creator_->ResetJavaScriptState(this); | 316 dialog_creator_->ResetJavaScriptState(this); |
| 314 | 317 |
| 315 if (color_chooser_) | 318 if (color_chooser_) |
| (...skipping 2276 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2592 void TabContents::CreateViewAndSetSizeForRVH(RenderViewHost* rvh) { | 2595 void TabContents::CreateViewAndSetSizeForRVH(RenderViewHost* rvh) { |
| 2593 RenderWidgetHostView* rwh_view = GetView()->CreateViewForWidget(rvh); | 2596 RenderWidgetHostView* rwh_view = GetView()->CreateViewForWidget(rvh); |
| 2594 // Can be NULL during tests. | 2597 // Can be NULL during tests. |
| 2595 if (rwh_view) | 2598 if (rwh_view) |
| 2596 rwh_view->SetSize(GetView()->GetContainerSize()); | 2599 rwh_view->SetSize(GetView()->GetContainerSize()); |
| 2597 } | 2600 } |
| 2598 | 2601 |
| 2599 RenderViewHostImpl* TabContents::GetRenderViewHostImpl() { | 2602 RenderViewHostImpl* TabContents::GetRenderViewHostImpl() { |
| 2600 return static_cast<RenderViewHostImpl*>(GetRenderViewHost()); | 2603 return static_cast<RenderViewHostImpl*>(GetRenderViewHost()); |
| 2601 } | 2604 } |
| OLD | NEW |