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

Side by Side Diff: chrome/browser/renderer_host/resource_message_filter.cc

Issue 2858049: Chromium plumbing for Device Orientation. (Closed)
Patch Set: Fixes after try bot runs Created 10 years, 4 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
« no previous file with comments | « chrome/browser/renderer_host/resource_message_filter.h ('k') | chrome/chrome_browser.gypi » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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/resource_message_filter.h" 5 #include "chrome/browser/renderer_host/resource_message_filter.h"
6 6
7 #include "app/clipboard/clipboard.h" 7 #include "app/clipboard/clipboard.h"
8 #include "base/callback.h" 8 #include "base/callback.h"
9 #include "base/command_line.h" 9 #include "base/command_line.h"
10 #if defined(OS_POSIX) 10 #if defined(OS_POSIX)
11 #include "base/file_descriptor_posix.h" 11 #include "base/file_descriptor_posix.h"
12 #endif 12 #endif
13 #include "base/file_util.h" 13 #include "base/file_util.h"
14 #include "base/file_path.h" 14 #include "base/file_path.h"
15 #include "base/histogram.h" 15 #include "base/histogram.h"
16 #include "base/process_util.h" 16 #include "base/process_util.h"
17 #include "base/shared_memory.h" 17 #include "base/shared_memory.h"
18 #include "base/thread.h" 18 #include "base/thread.h"
19 #include "base/utf_string_conversions.h" 19 #include "base/utf_string_conversions.h"
20 #include "base/worker_pool.h" 20 #include "base/worker_pool.h"
21 #include "chrome/browser/appcache/appcache_dispatcher_host.h" 21 #include "chrome/browser/appcache/appcache_dispatcher_host.h"
22 #include "chrome/browser/automation/automation_resource_message_filter.h" 22 #include "chrome/browser/automation/automation_resource_message_filter.h"
23 #include "chrome/browser/browser_about_handler.h" 23 #include "chrome/browser/browser_about_handler.h"
24 #include "chrome/browser/browser_process.h" 24 #include "chrome/browser/browser_process.h"
25 #include "chrome/browser/child_process_security_policy.h" 25 #include "chrome/browser/child_process_security_policy.h"
26 #include "chrome/browser/chrome_plugin_browsing_context.h" 26 #include "chrome/browser/chrome_plugin_browsing_context.h"
27 #include "chrome/browser/chrome_thread.h" 27 #include "chrome/browser/chrome_thread.h"
28 #include "chrome/browser/clipboard_dispatcher.h" 28 #include "chrome/browser/clipboard_dispatcher.h"
29 #include "chrome/browser/device_orientation/dispatcher_host.h"
29 #include "chrome/browser/download/download_file.h" 30 #include "chrome/browser/download/download_file.h"
30 #include "chrome/browser/extensions/extension_message_service.h" 31 #include "chrome/browser/extensions/extension_message_service.h"
31 #include "chrome/browser/geolocation/geolocation_permission_context.h" 32 #include "chrome/browser/geolocation/geolocation_permission_context.h"
32 #include "chrome/browser/geolocation/geolocation_dispatcher_host.h" 33 #include "chrome/browser/geolocation/geolocation_dispatcher_host.h"
33 #include "chrome/browser/gpu_process_host.h" 34 #include "chrome/browser/gpu_process_host.h"
34 #include "chrome/browser/host_zoom_map.h" 35 #include "chrome/browser/host_zoom_map.h"
35 #include "chrome/browser/in_process_webkit/dom_storage_dispatcher_host.h" 36 #include "chrome/browser/in_process_webkit/dom_storage_dispatcher_host.h"
36 #include "chrome/browser/in_process_webkit/indexed_db_dispatcher_host.h" 37 #include "chrome/browser/in_process_webkit/indexed_db_dispatcher_host.h"
37 #include "chrome/browser/metrics/histogram_synchronizer.h" 38 #include "chrome/browser/metrics/histogram_synchronizer.h"
38 #include "chrome/browser/nacl_host/nacl_process_host.h" 39 #include "chrome/browser/nacl_host/nacl_process_host.h"
(...skipping 189 matching lines...) Expand 10 before | Expand all | Expand 10 after
228 notification_prefs_( 229 notification_prefs_(
229 profile->GetDesktopNotificationService()->prefs_cache()), 230 profile->GetDesktopNotificationService()->prefs_cache()),
230 host_zoom_map_(profile->GetHostZoomMap()), 231 host_zoom_map_(profile->GetHostZoomMap()),
231 off_the_record_(profile->IsOffTheRecord()), 232 off_the_record_(profile->IsOffTheRecord()),
232 next_route_id_callback_(NewCallbackWithReturnValue( 233 next_route_id_callback_(NewCallbackWithReturnValue(
233 render_widget_helper, &RenderWidgetHelper::GetNextRoutingID)), 234 render_widget_helper, &RenderWidgetHelper::GetNextRoutingID)),
234 ALLOW_THIS_IN_INITIALIZER_LIST(speech_input_dispatcher_host_( 235 ALLOW_THIS_IN_INITIALIZER_LIST(speech_input_dispatcher_host_(
235 new speech_input::SpeechInputDispatcherHost(this->id()))), 236 new speech_input::SpeechInputDispatcherHost(this->id()))),
236 ALLOW_THIS_IN_INITIALIZER_LIST(geolocation_dispatcher_host_( 237 ALLOW_THIS_IN_INITIALIZER_LIST(geolocation_dispatcher_host_(
237 GeolocationDispatcherHost::New( 238 GeolocationDispatcherHost::New(
238 this->id(), profile->GetGeolocationPermissionContext()))) { 239 this->id(), profile->GetGeolocationPermissionContext()))),
240 ALLOW_THIS_IN_INITIALIZER_LIST(device_orientation_dispatcher_host_(
241 new device_orientation::DispatcherHost(this->id()))) {
239 request_context_ = profile_->GetRequestContext(); 242 request_context_ = profile_->GetRequestContext();
240
241 DCHECK(request_context_); 243 DCHECK(request_context_);
242 DCHECK(media_request_context_); 244 DCHECK(media_request_context_);
243 DCHECK(audio_renderer_host_.get()); 245 DCHECK(audio_renderer_host_.get());
244 DCHECK(appcache_dispatcher_host_.get()); 246 DCHECK(appcache_dispatcher_host_.get());
245 DCHECK(dom_storage_dispatcher_host_.get()); 247 DCHECK(dom_storage_dispatcher_host_.get());
246 248
247 render_widget_helper_->Init(id(), resource_dispatcher_host_); 249 render_widget_helper_->Init(id(), resource_dispatcher_host_);
248 #if defined(OS_CHROMEOS) 250 #if defined(OS_CHROMEOS)
249 cloud_print_enabled_ = true; 251 cloud_print_enabled_ = true;
250 #else 252 #else
(...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after
329 bool handled = 331 bool handled =
330 resource_dispatcher_host_->OnMessageReceived(msg, this, &msg_is_ok) || 332 resource_dispatcher_host_->OnMessageReceived(msg, this, &msg_is_ok) ||
331 appcache_dispatcher_host_->OnMessageReceived(msg, &msg_is_ok) || 333 appcache_dispatcher_host_->OnMessageReceived(msg, &msg_is_ok) ||
332 dom_storage_dispatcher_host_->OnMessageReceived(msg, &msg_is_ok) || 334 dom_storage_dispatcher_host_->OnMessageReceived(msg, &msg_is_ok) ||
333 indexed_db_dispatcher_host_->OnMessageReceived(msg) || 335 indexed_db_dispatcher_host_->OnMessageReceived(msg) ||
334 audio_renderer_host_->OnMessageReceived(msg, &msg_is_ok) || 336 audio_renderer_host_->OnMessageReceived(msg, &msg_is_ok) ||
335 db_dispatcher_host_->OnMessageReceived(msg, &msg_is_ok) || 337 db_dispatcher_host_->OnMessageReceived(msg, &msg_is_ok) ||
336 mp_dispatcher->OnMessageReceived( 338 mp_dispatcher->OnMessageReceived(
337 msg, this, next_route_id_callback(), &msg_is_ok) || 339 msg, this, next_route_id_callback(), &msg_is_ok) ||
338 geolocation_dispatcher_host_->OnMessageReceived(msg, &msg_is_ok) || 340 geolocation_dispatcher_host_->OnMessageReceived(msg, &msg_is_ok) ||
339 speech_input_dispatcher_host_->OnMessageReceived(msg, &msg_is_ok); 341 speech_input_dispatcher_host_->OnMessageReceived(msg, &msg_is_ok) ||
342 device_orientation_dispatcher_host_->OnMessageReceived(msg, &msg_is_ok);
340 343
341 if (!handled) { 344 if (!handled) {
342 DCHECK(msg_is_ok); // It should have been marked handled if it wasn't OK. 345 DCHECK(msg_is_ok); // It should have been marked handled if it wasn't OK.
343 handled = true; 346 handled = true;
344 IPC_BEGIN_MESSAGE_MAP_EX(ResourceMessageFilter, msg, msg_is_ok) 347 IPC_BEGIN_MESSAGE_MAP_EX(ResourceMessageFilter, msg, msg_is_ok)
345 // On Linux we need to dispatch these messages to the UI2 thread 348 // On Linux we need to dispatch these messages to the UI2 thread
346 // because we cannot make X calls from the IO thread. Mac 349 // because we cannot make X calls from the IO thread. Mac
347 // doesn't have windowed plug-ins so we handle the messages in 350 // doesn't have windowed plug-ins so we handle the messages in
348 // the UI thread. On Windows, we intercept the messages and 351 // the UI thread. On Windows, we intercept the messages and
349 // handle them directly. 352 // handle them directly.
(...skipping 1317 matching lines...) Expand 10 before | Expand all | Expand 10 after
1667 std::vector<webkit_glue::WebCookie> cookies; 1670 std::vector<webkit_glue::WebCookie> cookies;
1668 for (size_t i = 0; i < cookie_list.size(); ++i) { 1671 for (size_t i = 0; i < cookie_list.size(); ++i) {
1669 cookies.push_back(webkit_glue::WebCookie(cookie_list[i])); 1672 cookies.push_back(webkit_glue::WebCookie(cookie_list[i]));
1670 } 1673 }
1671 1674
1672 ViewHostMsg_GetRawCookies::WriteReplyParams(reply_msg_, cookies); 1675 ViewHostMsg_GetRawCookies::WriteReplyParams(reply_msg_, cookies);
1673 filter_->Send(reply_msg_); 1676 filter_->Send(reply_msg_);
1674 delete this; 1677 delete this;
1675 } 1678 }
1676 } 1679 }
1677
OLDNEW
« no previous file with comments | « chrome/browser/renderer_host/resource_message_filter.h ('k') | chrome/chrome_browser.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698