| 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/web_contents.h" | 5 #include "chrome/browser/tab_contents/web_contents.h" |
| 6 | 6 |
| 7 #include "base/command_line.h" | 7 #include "base/command_line.h" |
| 8 #include "base/compiler_specific.h" | 8 #include "base/compiler_specific.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 1524 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1535 // RenderView, that means it's for the pending entry, so we have to use the | 1535 // RenderView, that means it's for the pending entry, so we have to use the |
| 1536 // pending DOM UI. | 1536 // pending DOM UI. |
| 1537 if (render_manager_.pending_dom_ui()) | 1537 if (render_manager_.pending_dom_ui()) |
| 1538 render_view_host->AllowDOMUIBindings(); | 1538 render_view_host->AllowDOMUIBindings(); |
| 1539 | 1539 |
| 1540 RenderWidgetHostView* rwh_view = view_->CreateViewForWidget(render_view_host); | 1540 RenderWidgetHostView* rwh_view = view_->CreateViewForWidget(render_view_host); |
| 1541 if (!render_view_host->CreateRenderView()) | 1541 if (!render_view_host->CreateRenderView()) |
| 1542 return false; | 1542 return false; |
| 1543 | 1543 |
| 1544 // Now that the RenderView has been created, we need to tell it its size. | 1544 // Now that the RenderView has been created, we need to tell it its size. |
| 1545 rwh_view->SetSize(view_->GetContainerSize()); | 1545 view_->SetChildSize(rwh_view); |
| 1546 | 1546 |
| 1547 UpdateMaxPageIDIfNecessary(render_view_host->site_instance(), | 1547 UpdateMaxPageIDIfNecessary(render_view_host->site_instance(), |
| 1548 render_view_host); | 1548 render_view_host); |
| 1549 return true; | 1549 return true; |
| 1550 } | 1550 } |
| 1551 | 1551 |
| 1552 void WebContents::Observe(NotificationType type, | 1552 void WebContents::Observe(NotificationType type, |
| 1553 const NotificationSource& source, | 1553 const NotificationSource& source, |
| 1554 const NotificationDetails& details) { | 1554 const NotificationDetails& details) { |
| 1555 switch (type.value) { | 1555 switch (type.value) { |
| (...skipping 398 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1954 // -> Use pending DOM UI if any. | 1954 // -> Use pending DOM UI if any. |
| 1955 // | 1955 // |
| 1956 // - Normal state with no load: committed nav entry + no pending nav entry: | 1956 // - Normal state with no load: committed nav entry + no pending nav entry: |
| 1957 // -> Use committed DOM UI. | 1957 // -> Use committed DOM UI. |
| 1958 if (controller()->GetPendingEntry() && | 1958 if (controller()->GetPendingEntry() && |
| 1959 (controller()->GetLastCommittedEntry() || | 1959 (controller()->GetLastCommittedEntry() || |
| 1960 render_manager_.pending_dom_ui())) | 1960 render_manager_.pending_dom_ui())) |
| 1961 return render_manager_.pending_dom_ui(); | 1961 return render_manager_.pending_dom_ui(); |
| 1962 return render_manager_.dom_ui(); | 1962 return render_manager_.dom_ui(); |
| 1963 } | 1963 } |
| OLD | NEW |