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

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

Issue 1225183002: Font size in DomDistiller prefs syncs with local scaling (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix for rebasing Created 5 years, 4 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 #ifndef COMPONENTS_DOM_DISTILLER_CORE_DOM_DISTILLER_REQUEST_VIEW_BASE_H_ 5 #ifndef COMPONENTS_DOM_DISTILLER_CORE_DOM_DISTILLER_REQUEST_VIEW_BASE_H_
6 #define COMPONENTS_DOM_DISTILLER_CORE_DOM_DISTILLER_REQUEST_VIEW_BASE_H_ 6 #define COMPONENTS_DOM_DISTILLER_CORE_DOM_DISTILLER_REQUEST_VIEW_BASE_H_
7 7
8 #include <sstream> 8 #include <sstream>
9 #include <string> 9 #include <string>
10 #include <vector> 10 #include <vector>
(...skipping 22 matching lines...) Expand all
33 33
34 // ViewRequestDelegate implementation: 34 // ViewRequestDelegate implementation:
35 void OnArticleReady(const DistilledArticleProto* article_proto) override; 35 void OnArticleReady(const DistilledArticleProto* article_proto) override;
36 36
37 void OnArticleUpdated(ArticleDistillationUpdate article_update) override; 37 void OnArticleUpdated(ArticleDistillationUpdate article_update) override;
38 38
39 void TakeViewerHandle(scoped_ptr<ViewerHandle> viewer_handle); 39 void TakeViewerHandle(scoped_ptr<ViewerHandle> viewer_handle);
40 40
41 protected: 41 protected:
42 // DistilledPagePrefs::Observer implementation: 42 // DistilledPagePrefs::Observer implementation:
43 void OnChangeTheme(DistilledPagePrefs::Theme new_theme) override;
43 void OnChangeFontFamily( 44 void OnChangeFontFamily(
44 DistilledPagePrefs::FontFamily new_font_family) override; 45 DistilledPagePrefs::FontFamily new_font_family) override;
45 void OnChangeTheme(DistilledPagePrefs::Theme new_theme) override; 46 void OnChangeFontScaling(float scaling) override;
46 47
47 // Sends JavaScript to the attached Viewer, buffering data if the viewer isn't 48 // Sends JavaScript to the attached Viewer, buffering data if the viewer isn't
48 // ready. 49 // ready.
49 virtual void SendJavaScript(const std::string& buffer) = 0; 50 virtual void SendJavaScript(const std::string& buffer) = 0;
50 51
51 // The handle to the view request towards the DomDistillerService. It 52 // The handle to the view request towards the DomDistillerService. It
52 // needs to be kept around to ensure the distillation request finishes. 53 // needs to be kept around to ensure the distillation request finishes.
53 scoped_ptr<ViewerHandle> viewer_handle_; 54 scoped_ptr<ViewerHandle> viewer_handle_;
54 55
55 // Number of pages of the distilled article content that have been rendered by 56 // Number of pages of the distilled article content that have been rendered by
56 // the viewer. 57 // the viewer.
57 int page_count_; 58 int page_count_;
58 59
59 // Interface for accessing preferences for distilled pages. 60 // Interface for accessing preferences for distilled pages.
60 DistilledPagePrefs* distilled_page_prefs_; 61 DistilledPagePrefs* distilled_page_prefs_;
61 62
62 // Flag to tell this observer that the web contents are in an error state. 63 // Flag to tell this observer that the web contents are in an error state.
63 bool is_error_page_; 64 bool is_error_page_;
64 }; 65 };
65 66
66 } // namespace dom_distiller 67 } // namespace dom_distiller
67 68
68 #endif // COMPONENTS_DOM_DISTILLER_CORE_DOM_DISTILLER_REQUEST_VIEW_BASE_H_ 69 #endif // COMPONENTS_DOM_DISTILLER_CORE_DOM_DISTILLER_REQUEST_VIEW_BASE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698