| 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/renderer_host/render_view_host.h" | 5 #include "chrome/browser/renderer_host/render_view_host.h" |
| 6 | 6 |
| 7 #include <string> | 7 #include <string> |
| 8 #include <vector> | 8 #include <vector> |
| 9 | 9 |
| 10 #include "app/l10n_util.h" | 10 #include "app/l10n_util.h" |
| (...skipping 205 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 216 delegate_->GetWebkitPrefs(), | 216 delegate_->GetWebkitPrefs(), |
| 217 routing_id())); | 217 routing_id())); |
| 218 | 218 |
| 219 // Set the alternate error page, which is profile specific, in the renderer. | 219 // Set the alternate error page, which is profile specific, in the renderer. |
| 220 GURL url = delegate_->GetAlternateErrorPageURL(); | 220 GURL url = delegate_->GetAlternateErrorPageURL(); |
| 221 SetAlternateErrorPageURL(url); | 221 SetAlternateErrorPageURL(url); |
| 222 | 222 |
| 223 // If it's enabled, tell the renderer to set up the Javascript bindings for | 223 // If it's enabled, tell the renderer to set up the Javascript bindings for |
| 224 // sending messages back to the browser. | 224 // sending messages back to the browser. |
| 225 Send(new ViewMsg_AllowBindings(routing_id(), enabled_bindings_)); | 225 Send(new ViewMsg_AllowBindings(routing_id(), enabled_bindings_)); |
| 226 | 226 UpdateBrowserWindowId(delegate_->GetBrowserWindowID()); |
| 227 Send(new ViewMsg_NotifyRenderViewType(routing_id(), |
| 228 delegate_->GetRenderViewType())); |
| 227 // Let our delegate know that we created a RenderView. | 229 // Let our delegate know that we created a RenderView. |
| 228 delegate_->RenderViewCreated(this); | 230 delegate_->RenderViewCreated(this); |
| 229 process()->ViewCreated(); | 231 process()->ViewCreated(); |
| 230 | 232 |
| 231 return true; | 233 return true; |
| 232 } | 234 } |
| 233 | 235 |
| 234 bool RenderViewHost::IsRenderViewLive() const { | 236 bool RenderViewHost::IsRenderViewLive() const { |
| 235 return process()->HasConnection() && renderer_initialized_; | 237 return process()->HasConnection() && renderer_initialized_; |
| 236 } | 238 } |
| (...skipping 1397 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1634 | 1636 |
| 1635 void RenderViewHost::SignalModalDialogEvent() { | 1637 void RenderViewHost::SignalModalDialogEvent() { |
| 1636 if (modal_dialog_count_++ == 0) | 1638 if (modal_dialog_count_++ == 0) |
| 1637 modal_dialog_event_->Signal(); | 1639 modal_dialog_event_->Signal(); |
| 1638 } | 1640 } |
| 1639 | 1641 |
| 1640 void RenderViewHost::ResetModalDialogEvent() { | 1642 void RenderViewHost::ResetModalDialogEvent() { |
| 1641 if (--modal_dialog_count_ == 0) | 1643 if (--modal_dialog_count_ == 0) |
| 1642 modal_dialog_event_->Reset(); | 1644 modal_dialog_event_->Reset(); |
| 1643 } | 1645 } |
| 1646 |
| 1647 void RenderViewHost::UpdateBrowserWindowId(int window_id) { |
| 1648 Send(new ViewMsg_UpdateBrowserWindowId(routing_id(), window_id)); |
| 1649 } |
| OLD | NEW |