OLD | NEW |
1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2009 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.h" | 5 #include "chrome/browser/tab_contents/tab_contents.h" |
6 | 6 |
7 #include "app/l10n_util.h" | 7 #include "app/l10n_util.h" |
8 #include "app/resource_bundle.h" | 8 #include "app/resource_bundle.h" |
9 #include "base/file_version_info.h" | 9 #include "base/file_version_info.h" |
10 #include "base/process_util.h" | 10 #include "base/process_util.h" |
(...skipping 2374 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2385 | 2385 |
2386 bool TabContents::CreateRenderViewForRenderManager( | 2386 bool TabContents::CreateRenderViewForRenderManager( |
2387 RenderViewHost* render_view_host) { | 2387 RenderViewHost* render_view_host) { |
2388 // When we're running a DOM UI, the RenderViewHost needs to be put in DOM UI | 2388 // When we're running a DOM UI, the RenderViewHost needs to be put in DOM UI |
2389 // mode before CreateRenderView is called. When we're asked to create a | 2389 // mode before CreateRenderView is called. When we're asked to create a |
2390 // RenderView, that means it's for the pending entry, so we have to use the | 2390 // RenderView, that means it's for the pending entry, so we have to use the |
2391 // pending DOM UI. | 2391 // pending DOM UI. |
2392 if (render_manager_.pending_dom_ui()) | 2392 if (render_manager_.pending_dom_ui()) |
2393 render_view_host->AllowDOMUIBindings(); | 2393 render_view_host->AllowDOMUIBindings(); |
2394 | 2394 |
| 2395 // Ditto for extension bindings. |
| 2396 if (controller().pending_entry()->url().SchemeIs(chrome::kExtensionScheme)) |
| 2397 render_view_host->AllowExtensionBindings(); |
| 2398 |
2395 RenderWidgetHostView* rwh_view = view_->CreateViewForWidget(render_view_host); | 2399 RenderWidgetHostView* rwh_view = view_->CreateViewForWidget(render_view_host); |
2396 if (!render_view_host->CreateRenderView()) | 2400 if (!render_view_host->CreateRenderView()) |
2397 return false; | 2401 return false; |
2398 | 2402 |
2399 // Now that the RenderView has been created, we need to tell it its size. | 2403 // Now that the RenderView has been created, we need to tell it its size. |
2400 rwh_view->SetSize(view_->GetContainerSize()); | 2404 rwh_view->SetSize(view_->GetContainerSize()); |
2401 | 2405 |
2402 UpdateMaxPageIDIfNecessary(render_view_host->site_instance(), | 2406 UpdateMaxPageIDIfNecessary(render_view_host->site_instance(), |
2403 render_view_host); | 2407 render_view_host); |
2404 return true; | 2408 return true; |
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2444 NavigationController::LoadCommittedDetails& committed_details = | 2448 NavigationController::LoadCommittedDetails& committed_details = |
2445 *(Details<NavigationController::LoadCommittedDetails>(details).ptr()); | 2449 *(Details<NavigationController::LoadCommittedDetails>(details).ptr()); |
2446 ExpireInfoBars(committed_details); | 2450 ExpireInfoBars(committed_details); |
2447 break; | 2451 break; |
2448 } | 2452 } |
2449 | 2453 |
2450 default: | 2454 default: |
2451 NOTREACHED(); | 2455 NOTREACHED(); |
2452 } | 2456 } |
2453 } | 2457 } |
OLD | NEW |