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

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

Issue 1873783003: Convert //content/renderer from scoped_ptr to std::unique_ptr (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 8 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 | « content/renderer/renderer_main.cc ('k') | content/renderer/resource_fetcher_browsertest.cc » ('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) 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_main_platform_delegate.h" 5 #include "content/renderer/renderer_main_platform_delegate.h"
6 6
7 #include <dwrite.h> 7 #include <dwrite.h>
8 8
9 #include <memory>
10
9 #include "base/command_line.h" 11 #include "base/command_line.h"
10 #include "base/logging.h" 12 #include "base/logging.h"
11 #include "base/memory/scoped_ptr.h"
12 #include "base/strings/string16.h" 13 #include "base/strings/string16.h"
13 #include "base/win/scoped_comptr.h" 14 #include "base/win/scoped_comptr.h"
14 #include "base/win/win_util.h" 15 #include "base/win/win_util.h"
15 #include "base/win/windows_version.h" 16 #include "base/win/windows_version.h"
16 #include "content/child/dwrite_font_proxy/dwrite_font_proxy_init_win.h" 17 #include "content/child/dwrite_font_proxy/dwrite_font_proxy_init_win.h"
17 #include "content/child/font_warmup_win.h" 18 #include "content/child/font_warmup_win.h"
18 #include "content/public/common/content_switches.h" 19 #include "content/public/common/content_switches.h"
19 #include "content/public/common/injection_test_win.h" 20 #include "content/public/common/injection_test_win.h"
20 #include "content/public/renderer/render_thread.h" 21 #include "content/public/renderer/render_thread.h"
21 #include "content/renderer/render_thread_impl.h" 22 #include "content/renderer/render_thread_impl.h"
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
58 bool no_sandbox = command_line.HasSwitch(switches::kNoSandbox); 59 bool no_sandbox = command_line.HasSwitch(switches::kNoSandbox);
59 60
60 bool use_direct_write = gfx::win::ShouldUseDirectWrite(); 61 bool use_direct_write = gfx::win::ShouldUseDirectWrite();
61 if (!no_sandbox) { 62 if (!no_sandbox) {
62 // ICU DateFormat class (used in base/time_format.cc) needs to get the 63 // ICU DateFormat class (used in base/time_format.cc) needs to get the
63 // Olson timezone ID by accessing the registry keys under 64 // Olson timezone ID by accessing the registry keys under
64 // HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones. 65 // HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones.
65 // After TimeZone::createDefault is called once here, the timezone ID is 66 // After TimeZone::createDefault is called once here, the timezone ID is
66 // cached and there's no more need to access the registry. If the sandbox 67 // cached and there's no more need to access the registry. If the sandbox
67 // is disabled, we don't have to make this dummy call. 68 // is disabled, we don't have to make this dummy call.
68 scoped_ptr<icu::TimeZone> zone(icu::TimeZone::createDefault()); 69 std::unique_ptr<icu::TimeZone> zone(icu::TimeZone::createDefault());
69 70
70 if (use_direct_write) { 71 if (use_direct_write) {
71 InitializeDWriteFontProxy(); 72 InitializeDWriteFontProxy();
72 } else { 73 } else {
73 SkTypeface_SetEnsureLOGFONTAccessibleProc(SkiaPreCacheFont); 74 SkTypeface_SetEnsureLOGFONTAccessibleProc(SkiaPreCacheFont);
74 } 75 }
75 } 76 }
76 blink::WebFontRendering::setUseDirectWrite(use_direct_write); 77 blink::WebFontRendering::setUseDirectWrite(use_direct_write);
77 blink::WebFontRendering::setDeviceScaleFactor(gfx::GetDPIScale()); 78 blink::WebFontRendering::setDeviceScaleFactor(gfx::GetDPIScale());
78 } 79 }
(...skipping 11 matching lines...) Expand all
90 unsigned int dummy_rand; 91 unsigned int dummy_rand;
91 rand_s(&dummy_rand); 92 rand_s(&dummy_rand);
92 93
93 target_services->LowerToken(); 94 target_services->LowerToken();
94 return true; 95 return true;
95 } 96 }
96 return false; 97 return false;
97 } 98 }
98 99
99 } // namespace content 100 } // namespace content
OLDNEW
« no previous file with comments | « content/renderer/renderer_main.cc ('k') | content/renderer/resource_fetcher_browsertest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698