Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(301)

Side by Side Diff: content/browser/renderer_host/render_view_host.cc

Issue 9146028: Define the public interface for content browser SiteInstance. This interface is implemented by th... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 8 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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/renderer_host/render_view_host.h" 5 #include "content/browser/renderer_host/render_view_host.h"
6 6
7 #include <string> 7 #include <string>
8 #include <utility> 8 #include <utility>
9 #include <vector> 9 #include <vector>
10 10
11 #include "base/command_line.h" 11 #include "base/command_line.h"
12 #include "base/i18n/rtl.h" 12 #include "base/i18n/rtl.h"
13 #include "base/json/json_reader.h" 13 #include "base/json/json_reader.h"
14 #include "base/message_loop.h" 14 #include "base/message_loop.h"
15 #include "base/stl_util.h" 15 #include "base/stl_util.h"
16 #include "base/string_util.h" 16 #include "base/string_util.h"
17 #include "base/time.h" 17 #include "base/time.h"
18 #include "base/utf_string_conversions.h" 18 #include "base/utf_string_conversions.h"
19 #include "base/values.h" 19 #include "base/values.h"
20 #include "content/browser/child_process_security_policy.h" 20 #include "content/browser/child_process_security_policy.h"
21 #include "content/browser/cross_site_request_manager.h" 21 #include "content/browser/cross_site_request_manager.h"
22 #include "content/browser/gpu/gpu_surface_tracker.h" 22 #include "content/browser/gpu/gpu_surface_tracker.h"
23 #include "content/browser/host_zoom_map.h" 23 #include "content/browser/host_zoom_map.h"
24 #include "content/browser/in_process_webkit/session_storage_namespace.h" 24 #include "content/browser/in_process_webkit/session_storage_namespace.h"
25 #include "content/browser/power_save_blocker.h" 25 #include "content/browser/power_save_blocker.h"
26 #include "content/browser/renderer_host/render_process_host_impl.h" 26 #include "content/browser/renderer_host/render_process_host_impl.h"
27 #include "content/browser/renderer_host/render_widget_host.h" 27 #include "content/browser/renderer_host/render_widget_host.h"
28 #include "content/browser/renderer_host/render_widget_host_view.h" 28 #include "content/browser/renderer_host/render_widget_host_view.h"
29 #include "content/browser/site_instance.h"
30 #include "content/common/desktop_notification_messages.h" 29 #include "content/common/desktop_notification_messages.h"
31 #include "content/common/drag_messages.h" 30 #include "content/common/drag_messages.h"
32 #include "content/common/speech_input_messages.h" 31 #include "content/common/speech_input_messages.h"
33 #include "content/common/swapped_out_messages.h" 32 #include "content/common/swapped_out_messages.h"
34 #include "content/common/view_messages.h" 33 #include "content/common/view_messages.h"
35 #include "content/public/browser/browser_context.h" 34 #include "content/public/browser/browser_context.h"
36 #include "content/public/browser/browser_message_filter.h" 35 #include "content/public/browser/browser_message_filter.h"
37 #include "content/public/browser/content_browser_client.h" 36 #include "content/public/browser/content_browser_client.h"
38 #include "content/public/browser/native_web_keyboard_event.h" 37 #include "content/public/browser/native_web_keyboard_event.h"
39 #include "content/public/browser/notification_details.h" 38 #include "content/public/browser/notification_details.h"
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after
98 content::RenderProcessHost::FromID(render_process_id); 97 content::RenderProcessHost::FromID(render_process_id);
99 if (!process) 98 if (!process)
100 return NULL; 99 return NULL;
101 RenderWidgetHost* widget = static_cast<RenderWidgetHost*>( 100 RenderWidgetHost* widget = static_cast<RenderWidgetHost*>(
102 process->GetListenerByID(render_view_id)); 101 process->GetListenerByID(render_view_id));
103 if (!widget || !widget->IsRenderView()) 102 if (!widget || !widget->IsRenderView())
104 return NULL; 103 return NULL;
105 return static_cast<RenderViewHost*>(widget); 104 return static_cast<RenderViewHost*>(widget);
106 } 105 }
107 106
108 RenderViewHost::RenderViewHost(SiteInstance* instance, 107 RenderViewHost::RenderViewHost(content::SiteInstance* instance,
109 RenderViewHostDelegate* delegate, 108 RenderViewHostDelegate* delegate,
110 int routing_id, 109 int routing_id,
111 SessionStorageNamespace* session_storage) 110 SessionStorageNamespace* session_storage)
112 : RenderWidgetHost(instance->GetProcess(), routing_id), 111 : RenderWidgetHost(instance->GetProcess(), routing_id),
113 instance_(instance), 112 instance_(reinterpret_cast<SiteInstanceImpl*>(instance)),
jam 2012/01/24 03:29:33 use static_cast enough, since it's sufficient (and
ananta 2012/01/24 23:46:26 Done.
114 delegate_(delegate), 113 delegate_(delegate),
115 waiting_for_drag_context_response_(false), 114 waiting_for_drag_context_response_(false),
116 enabled_bindings_(0), 115 enabled_bindings_(0),
117 pending_request_id_(-1), 116 pending_request_id_(-1),
118 navigations_suspended_(false), 117 navigations_suspended_(false),
119 suspended_nav_message_(NULL), 118 suspended_nav_message_(NULL),
120 is_swapped_out_(false), 119 is_swapped_out_(false),
121 run_modal_reply_msg_(NULL), 120 run_modal_reply_msg_(NULL),
122 is_waiting_for_beforeunload_ack_(false), 121 is_waiting_for_beforeunload_ack_(false),
123 is_waiting_for_unload_ack_(false), 122 is_waiting_for_unload_ack_(false),
(...skipping 1421 matching lines...) Expand 10 before | Expand all | Expand 10 after
1545 1544
1546 void RenderViewHost::OnWebUISend(const GURL& source_url, 1545 void RenderViewHost::OnWebUISend(const GURL& source_url,
1547 const std::string& name, 1546 const std::string& name,
1548 const base::ListValue& args) { 1547 const base::ListValue& args) {
1549 delegate_->WebUISend(this, source_url, name, args); 1548 delegate_->WebUISend(this, source_url, name, args);
1550 } 1549 }
1551 1550
1552 void RenderViewHost::ClearPowerSaveBlockers() { 1551 void RenderViewHost::ClearPowerSaveBlockers() {
1553 STLDeleteValues(&power_save_blockers_); 1552 STLDeleteValues(&power_save_blockers_);
1554 } 1553 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698