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

Side by Side Diff: content/renderer/renderer_webkitplatformsupport_impl.cc

Issue 11410019: ********** Chromium Blob hacking (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 7 years, 10 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/renderer/renderer_webkitplatformsupport_impl.h" 5 #include "content/renderer/renderer_webkitplatformsupport_impl.h"
6 6
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "base/file_path.h" 8 #include "base/file_path.h"
9 #include "base/file_util.h" 9 #include "base/file_util.h"
10 #include "base/lazy_instance.h" 10 #include "base/lazy_instance.h"
11 #include "base/metrics/histogram.h" 11 #include "base/metrics/histogram.h"
12 #include "base/platform_file.h" 12 #include "base/platform_file.h"
13 #include "base/shared_memory.h" 13 #include "base/shared_memory.h"
14 #include "base/utf_string_conversions.h" 14 #include "base/utf_string_conversions.h"
15 #include "content/common/database_util.h" 15 #include "content/common/database_util.h"
16 #include "content/common/fileapi/webblobregistry_impl.h"
17 #include "content/common/fileapi/webfilesystem_impl.h" 16 #include "content/common/fileapi/webfilesystem_impl.h"
18 #include "content/common/file_utilities_messages.h" 17 #include "content/common/file_utilities_messages.h"
19 #include "content/common/indexed_db/proxy_webidbfactory_impl.h" 18 #include "content/common/indexed_db/proxy_webidbfactory_impl.h"
20 #include "content/common/mime_registry_messages.h" 19 #include "content/common/mime_registry_messages.h"
21 #include "content/common/npobject_util.h" 20 #include "content/common/npobject_util.h"
22 #include "content/common/view_messages.h" 21 #include "content/common/view_messages.h"
23 #include "content/common/webmessageportchannel_impl.h" 22 #include "content/common/webmessageportchannel_impl.h"
24 #include "content/public/common/content_switches.h" 23 #include "content/public/common/content_switches.h"
25 #include "content/public/common/gpu_info.h" 24 #include "content/public/common/gpu_info.h"
26 #include "content/public/renderer/content_renderer_client.h" 25 #include "content/public/renderer/content_renderer_client.h"
(...skipping 619 matching lines...) Expand 10 before | Expand all | Expand 10 after
646 void RendererWebKitPlatformSupportImpl::screenColorProfile( 645 void RendererWebKitPlatformSupportImpl::screenColorProfile(
647 WebVector<char>* to_profile) { 646 WebVector<char>* to_profile) {
648 std::vector<char> profile; 647 std::vector<char> profile;
649 RenderThread::Get()->Send( 648 RenderThread::Get()->Send(
650 new ViewHostMsg_GetMonitorColorProfile(&profile)); 649 new ViewHostMsg_GetMonitorColorProfile(&profile));
651 *to_profile = profile; 650 *to_profile = profile;
652 } 651 }
653 652
654 //------------------------------------------------------------------------------ 653 //------------------------------------------------------------------------------
655 654
656 WebBlobRegistry* RendererWebKitPlatformSupportImpl::blobRegistry() {
657 // ChildThread::current can be NULL when running some tests.
658 if (!blob_registry_.get() && ChildThread::current()) {
659 blob_registry_.reset(new WebBlobRegistryImpl(ChildThread::current()));
660 }
661 return blob_registry_.get();
662 }
663
664 //------------------------------------------------------------------------------
665
666 void RendererWebKitPlatformSupportImpl::sampleGamepads(WebGamepads& gamepads) { 655 void RendererWebKitPlatformSupportImpl::sampleGamepads(WebGamepads& gamepads) {
667 if (g_test_gamepads == 0) { 656 if (g_test_gamepads == 0) {
668 if (!gamepad_shared_memory_reader_.get()) 657 if (!gamepad_shared_memory_reader_.get())
669 gamepad_shared_memory_reader_.reset(new GamepadSharedMemoryReader); 658 gamepad_shared_memory_reader_.reset(new GamepadSharedMemoryReader);
670 gamepad_shared_memory_reader_->SampleGamepads(gamepads); 659 gamepad_shared_memory_reader_->SampleGamepads(gamepads);
671 } else { 660 } else {
672 gamepads = g_test_gamepads.Get(); 661 gamepads = g_test_gamepads.Get();
673 return; 662 return;
674 } 663 }
675 } 664 }
(...skipping 104 matching lines...) Expand 10 before | Expand all | Expand 10 after
780 //------------------------------------------------------------------------------ 769 //------------------------------------------------------------------------------
781 770
782 bool RendererWebKitPlatformSupportImpl::processMemorySizesInBytes( 771 bool RendererWebKitPlatformSupportImpl::processMemorySizesInBytes(
783 size_t* private_bytes, size_t* shared_bytes) { 772 size_t* private_bytes, size_t* shared_bytes) {
784 content::RenderThread::Get()->Send( 773 content::RenderThread::Get()->Send(
785 new ViewHostMsg_GetProcessMemorySizes(private_bytes, shared_bytes)); 774 new ViewHostMsg_GetProcessMemorySizes(private_bytes, shared_bytes));
786 return true; 775 return true;
787 } 776 }
788 777
789 } // namespace content 778 } // namespace content
OLDNEW
« no previous file with comments | « content/renderer/renderer_webkitplatformsupport_impl.h ('k') | content/worker/worker_webkitplatformsupport_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698