OLD | NEW |
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/render_thread_impl.h" | 5 #include "content/renderer/render_thread_impl.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 #include <limits> | 8 #include <limits> |
9 #include <map> | 9 #include <map> |
10 #include <vector> | 10 #include <vector> |
(...skipping 21 matching lines...) Expand all Loading... |
32 #include "base/values.h" | 32 #include "base/values.h" |
33 #include "cc/base/switches.h" | 33 #include "cc/base/switches.h" |
34 #include "cc/blink/web_external_bitmap_impl.h" | 34 #include "cc/blink/web_external_bitmap_impl.h" |
35 #include "cc/blink/web_layer_impl.h" | 35 #include "cc/blink/web_layer_impl.h" |
36 #include "cc/resources/raster_worker_pool.h" | 36 #include "cc/resources/raster_worker_pool.h" |
37 #include "content/child/appcache/appcache_dispatcher.h" | 37 #include "content/child/appcache/appcache_dispatcher.h" |
38 #include "content/child/appcache/appcache_frontend_impl.h" | 38 #include "content/child/appcache/appcache_frontend_impl.h" |
39 #include "content/child/child_discardable_shared_memory_manager.h" | 39 #include "content/child/child_discardable_shared_memory_manager.h" |
40 #include "content/child/child_gpu_memory_buffer_manager.h" | 40 #include "content/child/child_gpu_memory_buffer_manager.h" |
41 #include "content/child/child_histogram_message_filter.h" | 41 #include "content/child/child_histogram_message_filter.h" |
| 42 #include "content/child/child_shared_bitmap_manager.h" |
42 #include "content/child/content_child_helpers.h" | 43 #include "content/child/content_child_helpers.h" |
43 #include "content/child/db_message_filter.h" | 44 #include "content/child/db_message_filter.h" |
44 #include "content/child/indexed_db/indexed_db_dispatcher.h" | 45 #include "content/child/indexed_db/indexed_db_dispatcher.h" |
45 #include "content/child/indexed_db/indexed_db_message_filter.h" | 46 #include "content/child/indexed_db/indexed_db_message_filter.h" |
46 #include "content/child/npapi/npobject_util.h" | 47 #include "content/child/npapi/npobject_util.h" |
47 #include "content/child/plugin_messages.h" | 48 #include "content/child/plugin_messages.h" |
48 #include "content/child/resource_dispatcher.h" | 49 #include "content/child/resource_dispatcher.h" |
49 #include "content/child/runtime_features.h" | 50 #include "content/child/runtime_features.h" |
50 #include "content/child/thread_safe_sender.h" | 51 #include "content/child/thread_safe_sender.h" |
51 #include "content/child/web_database_observer_impl.h" | 52 #include "content/child/web_database_observer_impl.h" |
(...skipping 971 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1023 | 1024 |
1024 void RenderThreadImpl::RecordComputedAction(const std::string& action) { | 1025 void RenderThreadImpl::RecordComputedAction(const std::string& action) { |
1025 Send(new ViewHostMsg_UserMetricsRecordAction(action)); | 1026 Send(new ViewHostMsg_UserMetricsRecordAction(action)); |
1026 } | 1027 } |
1027 | 1028 |
1028 scoped_ptr<base::SharedMemory> | 1029 scoped_ptr<base::SharedMemory> |
1029 RenderThreadImpl::HostAllocateSharedMemoryBuffer(size_t size) { | 1030 RenderThreadImpl::HostAllocateSharedMemoryBuffer(size_t size) { |
1030 return ChildThread::AllocateSharedMemory(size, thread_safe_sender()); | 1031 return ChildThread::AllocateSharedMemory(size, thread_safe_sender()); |
1031 } | 1032 } |
1032 | 1033 |
| 1034 cc::SharedBitmapManager* RenderThreadImpl::GetSharedBitmapManager() { |
| 1035 return shared_bitmap_manager(); |
| 1036 } |
| 1037 |
1033 void RenderThreadImpl::RegisterExtension(v8::Extension* extension) { | 1038 void RenderThreadImpl::RegisterExtension(v8::Extension* extension) { |
1034 WebScriptController::registerExtension(extension); | 1039 WebScriptController::registerExtension(extension); |
1035 } | 1040 } |
1036 | 1041 |
1037 void RenderThreadImpl::ScheduleIdleHandler(int64 initial_delay_ms) { | 1042 void RenderThreadImpl::ScheduleIdleHandler(int64 initial_delay_ms) { |
1038 idle_notification_delay_in_ms_ = initial_delay_ms; | 1043 idle_notification_delay_in_ms_ = initial_delay_ms; |
1039 idle_timer_.Stop(); | 1044 idle_timer_.Stop(); |
1040 idle_timer_.Start(FROM_HERE, | 1045 idle_timer_.Start(FROM_HERE, |
1041 base::TimeDelta::FromMilliseconds(initial_delay_ms), | 1046 base::TimeDelta::FromMilliseconds(initial_delay_ms), |
1042 this, &RenderThreadImpl::IdleHandler); | 1047 this, &RenderThreadImpl::IdleHandler); |
(...skipping 572 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1615 hidden_widget_count_--; | 1620 hidden_widget_count_--; |
1616 | 1621 |
1617 if (!GetContentClient()->renderer()->RunIdleHandlerWhenWidgetsHidden()) { | 1622 if (!GetContentClient()->renderer()->RunIdleHandlerWhenWidgetsHidden()) { |
1618 return; | 1623 return; |
1619 } | 1624 } |
1620 | 1625 |
1621 ScheduleIdleHandler(kLongIdleHandlerDelayMs); | 1626 ScheduleIdleHandler(kLongIdleHandlerDelayMs); |
1622 } | 1627 } |
1623 | 1628 |
1624 } // namespace content | 1629 } // namespace content |
OLD | NEW |