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

Side by Side Diff: chrome/browser/chromeos/arc/arc_settings_service.h

Issue 1843563003: Move arc_intent_helper_bridge.h from c/b/chromeos/ to components/ (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix gn/gyp deps 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
(Empty)
1 // Copyright (c) 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #ifndef CHROME_BROWSER_CHROMEOS_ARC_ARC_SETTINGS_SERVICE_H_
6 #define CHROME_BROWSER_CHROMEOS_ARC_ARC_SETTINGS_SERVICE_H_
7
8 #include "base/macros.h"
9 #include "base/memory/scoped_ptr.h"
10 #include "components/arc/arc_bridge_service.h"
11 #include "components/arc/arc_service.h"
12
13 namespace arc {
14
15 class ArcSettingsServiceImpl;
16
17 namespace fontsizes {
18
19 // The following values were obtained from chrome://settings and Android's
20 // Display settings on Nov 2015. They are expected to remain stable.
21 const float kAndroidFontScaleSmall = 0.85;
22 const float kAndroidFontScaleNormal = 1;
23 const float kAndroidFontScaleLarge = 1.15;
24 const float kAndroidFontScaleHuge = 1.3;
25 const int kChromeFontSizeNormal = 16;
26 const int kChromeFontSizeLarge = 20;
27 const int kChromeFontSizeVeryLarge = 24;
28
29 // Android has only a single float value for system-wide font size
30 // (font_scale). Chrome has three main int pixel values that affect
31 // system-wide font size. We will take the largest font value of the three
32 // main font values on Chrome and convert to an Android size.
33 double ConvertFontSizeChromeToAndroid(int default_size,
34 int default_fixed_size,
35 int minimum_size);
36
37 } // namespace fontsizes
38
39 class ArcSettingsService : public ArcService,
40 public ArcBridgeService::Observer {
41 public:
42 explicit ArcSettingsService(ArcBridgeService* bridge_service);
43 ~ArcSettingsService() override;
44
45 // ArcBridgeService::Observer
46 void OnIntentHelperInstanceReady() override;
47 void OnIntentHelperInstanceClosed() override;
48
49 private:
50 scoped_ptr<ArcSettingsServiceImpl> impl_;
51
52 DISALLOW_COPY_AND_ASSIGN(ArcSettingsService);
53 };
54
55 } // namespace arc
56
57 #endif // CHROME_BROWSER_CHROMEOS_ARC_ARC_SETTINGS_SERVICE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698