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

Side by Side Diff: components/dom_distiller/core/dom_distiller_request_view_base.cc

Issue 1879613003: Convert //components/dom_distiller from scoped_ptr to std::unique_ptr (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase 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
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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 "components/dom_distiller/core/dom_distiller_request_view_base.h" 5 #include "components/dom_distiller/core/dom_distiller_request_view_base.h"
6 6
7 #include <memory>
7 #include <sstream> 8 #include <sstream>
8 #include <string> 9 #include <string>
9 #include <utility> 10 #include <utility>
10 #include <vector> 11 #include <vector>
11 12
12 #include "base/memory/scoped_ptr.h"
13 #include "components/dom_distiller/core/distilled_page_prefs.h" 13 #include "components/dom_distiller/core/distilled_page_prefs.h"
14 #include "components/dom_distiller/core/dom_distiller_service.h" 14 #include "components/dom_distiller/core/dom_distiller_service.h"
15 #include "components/dom_distiller/core/experiments.h" 15 #include "components/dom_distiller/core/experiments.h"
16 #include "components/dom_distiller/core/task_tracker.h" 16 #include "components/dom_distiller/core/task_tracker.h"
17 #include "components/dom_distiller/core/viewer.h" 17 #include "components/dom_distiller/core/viewer.h"
18 #include "grit/components_strings.h" 18 #include "grit/components_strings.h"
19 #include "ui/base/l10n/l10n_util.h" 19 #include "ui/base/l10n/l10n_util.h"
20 20
21 namespace dom_distiller { 21 namespace dom_distiller {
22 22
(...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after
107 void DomDistillerRequestViewBase::OnChangeFontFamily( 107 void DomDistillerRequestViewBase::OnChangeFontFamily(
108 DistilledPagePrefs::FontFamily new_font) { 108 DistilledPagePrefs::FontFamily new_font) {
109 SendJavaScript(viewer::GetDistilledPageFontFamilyJs(new_font)); 109 SendJavaScript(viewer::GetDistilledPageFontFamilyJs(new_font));
110 } 110 }
111 111
112 void DomDistillerRequestViewBase::OnChangeFontScaling(float scaling) { 112 void DomDistillerRequestViewBase::OnChangeFontScaling(float scaling) {
113 SendJavaScript(viewer::GetDistilledPageFontScalingJs(scaling)); 113 SendJavaScript(viewer::GetDistilledPageFontScalingJs(scaling));
114 } 114 }
115 115
116 void DomDistillerRequestViewBase::TakeViewerHandle( 116 void DomDistillerRequestViewBase::TakeViewerHandle(
117 scoped_ptr<ViewerHandle> viewer_handle) { 117 std::unique_ptr<ViewerHandle> viewer_handle) {
118 viewer_handle_ = std::move(viewer_handle); 118 viewer_handle_ = std::move(viewer_handle);
119 // Getting the viewer handle means this is not an error page, send 119 // Getting the viewer handle means this is not an error page, send
120 // the viewer JavaScript and show the loading indicator. 120 // the viewer JavaScript and show the loading indicator.
121 SendCommonJavaScript(); 121 SendCommonJavaScript();
122 } 122 }
123 123
124 void DomDistillerRequestViewBase::SendCommonJavaScript() { 124 void DomDistillerRequestViewBase::SendCommonJavaScript() {
125 SendJavaScript(viewer::GetJavaScript()); 125 SendJavaScript(viewer::GetJavaScript());
126 SendJavaScript(viewer::GetDistilledPageFontScalingJs( 126 SendJavaScript(viewer::GetDistilledPageFontScalingJs(
127 distilled_page_prefs_->GetFontScaling())); 127 distilled_page_prefs_->GetFontScaling()));
128 } 128 }
129 129
130 } // namespace dom_distiller 130 } // namespace dom_distiller
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698