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

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

Issue 7866019: New implementation of font precache on Windows. (Closed) Base URL: http://git.chromium.org/git/chromium.git@trunk
Patch Set: Merge to latest trunk Created 9 years, 3 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) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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.h" 5 #include "content/renderer/render_thread.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 53 matching lines...) Expand 10 before | Expand all | Expand 10 after
64 #include "third_party/WebKit/Source/WebKit/chromium/public/WebScriptController.h " 64 #include "third_party/WebKit/Source/WebKit/chromium/public/WebScriptController.h "
65 #include "third_party/WebKit/Source/WebKit/chromium/public/WebStorageEventDispat cher.h" 65 #include "third_party/WebKit/Source/WebKit/chromium/public/WebStorageEventDispat cher.h"
66 #include "third_party/WebKit/Source/WebKit/chromium/public/WebString.h" 66 #include "third_party/WebKit/Source/WebKit/chromium/public/WebString.h"
67 #include "third_party/WebKit/Source/WebKit/chromium/public/WebView.h" 67 #include "third_party/WebKit/Source/WebKit/chromium/public/WebView.h"
68 #include "v8/include/v8.h" 68 #include "v8/include/v8.h"
69 #include "webkit/extensions/v8/playback_extension.h" 69 #include "webkit/extensions/v8/playback_extension.h"
70 #include "webkit/glue/webkit_glue.h" 70 #include "webkit/glue/webkit_glue.h"
71 71
72 // TODO(port) 72 // TODO(port)
73 #if defined(OS_WIN) 73 #if defined(OS_WIN)
74 #include "content/common/child_process_messages.h"
74 #include "content/plugin/plugin_channel.h" 75 #include "content/plugin/plugin_channel.h"
75 #else 76 #else
76 #include "base/memory/scoped_handle.h" 77 #include "base/memory/scoped_handle.h"
77 #include "content/plugin/plugin_channel_base.h" 78 #include "content/plugin/plugin_channel_base.h"
78 #endif 79 #endif
79 80
80 #if defined(OS_WIN) 81 #if defined(OS_WIN)
81 #include <windows.h> 82 #include <windows.h>
82 #include <objbase.h> 83 #include <objbase.h>
83 #endif 84 #endif
(...skipping 428 matching lines...) Expand 10 before | Expand all | Expand 10 after
512 513
513 // static 514 // static
514 void RenderThread::RecordUserMetrics(const std::string& action) { 515 void RenderThread::RecordUserMetrics(const std::string& action) {
515 RenderThread::current()->Send( 516 RenderThread::current()->Send(
516 new ViewHostMsg_UserMetricsRecordAction(action)); 517 new ViewHostMsg_UserMetricsRecordAction(action));
517 } 518 }
518 519
519 #if defined(OS_WIN) 520 #if defined(OS_WIN)
520 // static 521 // static
521 bool RenderThread::PreCacheFont(const LOGFONT& log_font) { 522 bool RenderThread::PreCacheFont(const LOGFONT& log_font) {
522 return RenderThread::current()->Send(new ViewHostMsg_PreCacheFont(log_font)); 523 return RenderThread::current()->Send(
524 new ChildProcessHostMsg_PreCacheFont(log_font));
525 }
526
527 // static
528 bool RenderThread::ReleaseCachedFonts() {
529 return RenderThread::current()->Send(
530 new ChildProcessHostMsg_ReleaseCachedFonts());
523 } 531 }
524 #endif // OS_WIN 532 #endif // OS_WIN
525 533
526 bool RenderThread::OnControlMessageReceived(const IPC::Message& msg) { 534 bool RenderThread::OnControlMessageReceived(const IPC::Message& msg) {
527 ObserverListBase<RenderProcessObserver>::Iterator it(observers_); 535 ObserverListBase<RenderProcessObserver>::Iterator it(observers_);
528 RenderProcessObserver* observer; 536 RenderProcessObserver* observer;
529 while ((observer = it.GetNext()) != NULL) { 537 while ((observer = it.GetNext()) != NULL) {
530 if (observer->OnControlMessageReceived(msg)) 538 if (observer->OnControlMessageReceived(msg))
531 return true; 539 return true;
532 } 540 }
(...skipping 170 matching lines...) Expand 10 before | Expand all | Expand 10 after
703 711
704 void RenderThread::RegisterExtension(v8::Extension* extension) { 712 void RenderThread::RegisterExtension(v8::Extension* extension) {
705 WebScriptController::registerExtension(extension); 713 WebScriptController::registerExtension(extension);
706 v8_extensions_.insert(extension->name()); 714 v8_extensions_.insert(extension->name());
707 } 715 }
708 716
709 bool RenderThread::IsRegisteredExtension( 717 bool RenderThread::IsRegisteredExtension(
710 const std::string& v8_extension_name) const { 718 const std::string& v8_extension_name) const {
711 return v8_extensions_.find(v8_extension_name) != v8_extensions_.end(); 719 return v8_extensions_.find(v8_extension_name) != v8_extensions_.end();
712 } 720 }
OLDNEW
« no previous file with comments | « content/renderer/render_thread.h ('k') | content/renderer/renderer_webkitplatformsupport_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698