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

Side by Side Diff: content/renderer/render_thread_impl.h

Issue 897563002: Unify the three places that patch font loading for PDFium on Windows. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 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
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 #ifndef CONTENT_RENDERER_RENDER_THREAD_IMPL_H_ 5 #ifndef CONTENT_RENDERER_RENDER_THREAD_IMPL_H_
6 #define CONTENT_RENDERER_RENDER_THREAD_IMPL_H_ 6 #define CONTENT_RENDERER_RENDER_THREAD_IMPL_H_
7 7
8 #include <set> 8 #include <set>
9 #include <string> 9 #include <string>
10 #include <vector> 10 #include <vector>
11 11
12 #include "base/cancelable_callback.h" 12 #include "base/cancelable_callback.h"
13 #include "base/memory/memory_pressure_listener.h" 13 #include "base/memory/memory_pressure_listener.h"
14 #include "base/memory/ref_counted.h" 14 #include "base/memory/ref_counted.h"
15 #include "base/metrics/user_metrics_action.h" 15 #include "base/metrics/user_metrics_action.h"
16 #include "base/observer_list.h" 16 #include "base/observer_list.h"
17 #include "base/strings/string16.h" 17 #include "base/strings/string16.h"
18 #include "base/threading/thread_checker.h" 18 #include "base/threading/thread_checker.h"
19 #include "base/timer/timer.h" 19 #include "base/timer/timer.h"
20 #include "build/build_config.h" 20 #include "build/build_config.h"
21 #include "content/child/child_thread.h" 21 #include "content/child/child_thread_impl.h"
22 #include "content/common/content_export.h" 22 #include "content/common/content_export.h"
23 #include "content/common/frame_replication_state.h" 23 #include "content/common/frame_replication_state.h"
24 #include "content/common/gpu/client/gpu_channel_host.h" 24 #include "content/common/gpu/client/gpu_channel_host.h"
25 #include "content/common/gpu/gpu_result_codes.h" 25 #include "content/common/gpu/gpu_result_codes.h"
26 #include "content/public/renderer/render_thread.h" 26 #include "content/public/renderer/render_thread.h"
27 #include "content/renderer/gpu/compositor_dependencies.h" 27 #include "content/renderer/gpu/compositor_dependencies.h"
28 #include "net/base/network_change_notifier.h" 28 #include "net/base/network_change_notifier.h"
29 #include "third_party/WebKit/public/platform/WebConnectionType.h" 29 #include "third_party/WebKit/public/platform/WebConnectionType.h"
30 #include "ui/gfx/native_widget_types.h" 30 #include "ui/gfx/native_widget_types.h"
31 31
(...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after
103 class RenderProcessObserver; 103 class RenderProcessObserver;
104 class RendererBlinkPlatformImpl; 104 class RendererBlinkPlatformImpl;
105 class RendererDemuxerAndroid; 105 class RendererDemuxerAndroid;
106 class RendererScheduler; 106 class RendererScheduler;
107 class ResourceSchedulingFilter; 107 class ResourceSchedulingFilter;
108 class V8SamplingProfiler; 108 class V8SamplingProfiler;
109 class VideoCaptureImplManager; 109 class VideoCaptureImplManager;
110 class WebGraphicsContext3DCommandBufferImpl; 110 class WebGraphicsContext3DCommandBufferImpl;
111 class WebRTCIdentityService; 111 class WebRTCIdentityService;
112 112
113 #if defined(COMPILER_MSVC)
114 // See explanation for other RenderViewHostImpl which is the same issue.
115 #pragma warning(push)
116 #pragma warning(disable: 4250)
117 #endif
118
113 // The RenderThreadImpl class represents a background thread where RenderView 119 // The RenderThreadImpl class represents a background thread where RenderView
114 // instances live. The RenderThread supports an API that is used by its 120 // instances live. The RenderThread supports an API that is used by its
115 // consumer to talk indirectly to the RenderViews and supporting objects. 121 // consumer to talk indirectly to the RenderViews and supporting objects.
116 // Likewise, it provides an API for the RenderViews to talk back to the main 122 // Likewise, it provides an API for the RenderViews to talk back to the main
117 // process (i.e., their corresponding WebContentsImpl). 123 // process (i.e., their corresponding WebContentsImpl).
118 // 124 //
119 // Most of the communication occurs in the form of IPC messages. They are 125 // Most of the communication occurs in the form of IPC messages. They are
120 // routed to the RenderThread according to the routing IDs of the messages. 126 // routed to the RenderThread according to the routing IDs of the messages.
121 // The routing IDs correspond to RenderView instances. 127 // The routing IDs correspond to RenderView instances.
122 class CONTENT_EXPORT RenderThreadImpl 128 class CONTENT_EXPORT RenderThreadImpl
123 : public RenderThread, 129 : public RenderThread,
124 public ChildThread, 130 public ChildThreadImpl,
125 public GpuChannelHostFactory, 131 public GpuChannelHostFactory,
126 NON_EXPORTED_BASE(public CompositorDependencies) { 132 NON_EXPORTED_BASE(public CompositorDependencies) {
127 public: 133 public:
128 static RenderThreadImpl* current(); 134 static RenderThreadImpl* current();
129 135
130 RenderThreadImpl(); 136 RenderThreadImpl();
131 // Constructor that's used when running in single process mode. 137 // Constructor that's used when running in single process mode.
132 explicit RenderThreadImpl(const std::string& channel_name); 138 explicit RenderThreadImpl(const std::string& channel_name);
133 // Constructor that's used in RendererMain. 139 // Constructor that's used in RendererMain.
134 explicit RenderThreadImpl(scoped_ptr<base::MessageLoop> main_message_loop); 140 explicit RenderThreadImpl(scoped_ptr<base::MessageLoop> main_message_loop);
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
168 void RegisterExtension(v8::Extension* extension) override; 174 void RegisterExtension(v8::Extension* extension) override;
169 void ScheduleIdleHandler(int64 initial_delay_ms) override; 175 void ScheduleIdleHandler(int64 initial_delay_ms) override;
170 void IdleHandler() override; 176 void IdleHandler() override;
171 int64 GetIdleNotificationDelayInMs() const override; 177 int64 GetIdleNotificationDelayInMs() const override;
172 void SetIdleNotificationDelayInMs( 178 void SetIdleNotificationDelayInMs(
173 int64 idle_notification_delay_in_ms) override; 179 int64 idle_notification_delay_in_ms) override;
174 void UpdateHistograms(int sequence_number) override; 180 void UpdateHistograms(int sequence_number) override;
175 int PostTaskToAllWebWorkers(const base::Closure& closure) override; 181 int PostTaskToAllWebWorkers(const base::Closure& closure) override;
176 bool ResolveProxy(const GURL& url, std::string* proxy_list) override; 182 bool ResolveProxy(const GURL& url, std::string* proxy_list) override;
177 base::WaitableEvent* GetShutdownEvent() override; 183 base::WaitableEvent* GetShutdownEvent() override;
178 #if defined(OS_WIN)
179 virtual void PreCacheFont(const LOGFONT& log_font) override;
180 virtual void ReleaseCachedFonts() override;
181 #endif
182 ServiceRegistry* GetServiceRegistry() override; 184 ServiceRegistry* GetServiceRegistry() override;
183 185
184 // CompositorDependencies implementation. 186 // CompositorDependencies implementation.
185 bool IsImplSidePaintingEnabled() override; 187 bool IsImplSidePaintingEnabled() override;
186 bool IsGpuRasterizationForced() override; 188 bool IsGpuRasterizationForced() override;
187 bool IsGpuRasterizationEnabled() override; 189 bool IsGpuRasterizationEnabled() override;
188 int GetGpuRasterizationMSAASampleCount() override; 190 int GetGpuRasterizationMSAASampleCount() override;
189 bool IsLcdTextEnabled() override; 191 bool IsLcdTextEnabled() override;
190 bool IsDistanceFieldTextEnabled() override; 192 bool IsDistanceFieldTextEnabled() override;
191 bool IsZeroCopyEnabled() override; 193 bool IsZeroCopyEnabled() override;
(...skipping 426 matching lines...) Expand 10 before | Expand all | Expand 10 after
618 ~PendingRenderFrameConnect(); 620 ~PendingRenderFrameConnect();
619 }; 621 };
620 622
621 typedef std::map<int, scoped_refptr<PendingRenderFrameConnect>> 623 typedef std::map<int, scoped_refptr<PendingRenderFrameConnect>>
622 PendingRenderFrameConnectMap; 624 PendingRenderFrameConnectMap;
623 PendingRenderFrameConnectMap pending_render_frame_connects_; 625 PendingRenderFrameConnectMap pending_render_frame_connects_;
624 626
625 DISALLOW_COPY_AND_ASSIGN(RenderThreadImpl); 627 DISALLOW_COPY_AND_ASSIGN(RenderThreadImpl);
626 }; 628 };
627 629
630 #if defined(COMPILER_MSVC)
631 #pragma warning(pop)
632 #endif
633
628 } // namespace content 634 } // namespace content
629 635
630 #endif // CONTENT_RENDERER_RENDER_THREAD_IMPL_H_ 636 #endif // CONTENT_RENDERER_RENDER_THREAD_IMPL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698