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/resource_bundle.h" | 10 #include "app/resource_bundle.h" |
(...skipping 213 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
224 // Let our delegate know that we created a RenderView. | 224 // Let our delegate know that we created a RenderView. |
225 delegate_->RenderViewCreated(this); | 225 delegate_->RenderViewCreated(this); |
226 | 226 |
227 return true; | 227 return true; |
228 } | 228 } |
229 | 229 |
230 bool RenderViewHost::IsRenderViewLive() const { | 230 bool RenderViewHost::IsRenderViewLive() const { |
231 return process()->HasConnection() && renderer_initialized_; | 231 return process()->HasConnection() && renderer_initialized_; |
232 } | 232 } |
233 | 233 |
234 void RenderViewHost::SetRendererPrefs( | 234 void RenderViewHost::SyncRendererPrefs() { |
235 const RendererPreferences& renderer_prefs) { | 235 Send(new ViewMsg_SetRendererPrefs(routing_id(), |
236 Send(new ViewMsg_SetRendererPrefs(routing_id(), renderer_prefs)); | 236 delegate_->GetRendererPrefs())); |
237 } | 237 } |
238 | 238 |
239 void RenderViewHost::Navigate(const ViewMsg_Navigate_Params& params) { | 239 void RenderViewHost::Navigate(const ViewMsg_Navigate_Params& params) { |
240 ChildProcessSecurityPolicy::GetInstance()->GrantRequestURL( | 240 ChildProcessSecurityPolicy::GetInstance()->GrantRequestURL( |
241 process()->pid(), params.url); | 241 process()->pid(), params.url); |
242 | 242 |
243 ViewMsg_Navigate* nav_message = new ViewMsg_Navigate(routing_id(), params); | 243 ViewMsg_Navigate* nav_message = new ViewMsg_Navigate(routing_id(), params); |
244 | 244 |
245 // Only send the message if we aren't suspended at the start of a cross-site | 245 // Only send the message if we aren't suspended at the start of a cross-site |
246 // request. | 246 // request. |
(...skipping 1327 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1574 | 1574 |
1575 void RenderViewHost::SignalModalDialogEvent() { | 1575 void RenderViewHost::SignalModalDialogEvent() { |
1576 if (modal_dialog_count_++ == 0) | 1576 if (modal_dialog_count_++ == 0) |
1577 modal_dialog_event_->Signal(); | 1577 modal_dialog_event_->Signal(); |
1578 } | 1578 } |
1579 | 1579 |
1580 void RenderViewHost::ResetModalDialogEvent() { | 1580 void RenderViewHost::ResetModalDialogEvent() { |
1581 if (--modal_dialog_count_ == 0) | 1581 if (--modal_dialog_count_ == 0) |
1582 modal_dialog_event_->Reset(); | 1582 modal_dialog_event_->Reset(); |
1583 } | 1583 } |
OLD | NEW |