| Index: chrome/browser/chromeos/arc/arc_settings_service.h
|
| diff --git a/chrome/browser/chromeos/arc/arc_settings_service.h b/chrome/browser/chromeos/arc/arc_settings_service.h
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..705838aa88c04cd0c736352379e872fbfc7cd6e2
|
| --- /dev/null
|
| +++ b/chrome/browser/chromeos/arc/arc_settings_service.h
|
| @@ -0,0 +1,57 @@
|
| +// Copyright (c) 2015 The Chromium Authors. All rights reserved.
|
| +// Use of this source code is governed by a BSD-style license that can be
|
| +// found in the LICENSE file.
|
| +
|
| +#ifndef CHROME_BROWSER_CHROMEOS_ARC_ARC_SETTINGS_SERVICE_H_
|
| +#define CHROME_BROWSER_CHROMEOS_ARC_ARC_SETTINGS_SERVICE_H_
|
| +
|
| +#include "base/macros.h"
|
| +#include "base/memory/scoped_ptr.h"
|
| +#include "components/arc/arc_bridge_service.h"
|
| +#include "components/arc/arc_service.h"
|
| +
|
| +namespace arc {
|
| +
|
| +class ArcSettingsServiceImpl;
|
| +
|
| +namespace fontsizes {
|
| +
|
| +// The following values were obtained from chrome://settings and Android's
|
| +// Display settings on Nov 2015. They are expected to remain stable.
|
| +const float kAndroidFontScaleSmall = 0.85;
|
| +const float kAndroidFontScaleNormal = 1;
|
| +const float kAndroidFontScaleLarge = 1.15;
|
| +const float kAndroidFontScaleHuge = 1.3;
|
| +const int kChromeFontSizeNormal = 16;
|
| +const int kChromeFontSizeLarge = 20;
|
| +const int kChromeFontSizeVeryLarge = 24;
|
| +
|
| +// Android has only a single float value for system-wide font size
|
| +// (font_scale). Chrome has three main int pixel values that affect
|
| +// system-wide font size. We will take the largest font value of the three
|
| +// main font values on Chrome and convert to an Android size.
|
| +double ConvertFontSizeChromeToAndroid(int default_size,
|
| + int default_fixed_size,
|
| + int minimum_size);
|
| +
|
| +} // namespace fontsizes
|
| +
|
| +class ArcSettingsService : public ArcService,
|
| + public ArcBridgeService::Observer {
|
| + public:
|
| + explicit ArcSettingsService(ArcBridgeService* bridge_service);
|
| + ~ArcSettingsService() override;
|
| +
|
| + // ArcBridgeService::Observer
|
| + void OnIntentHelperInstanceReady() override;
|
| + void OnIntentHelperInstanceClosed() override;
|
| +
|
| + private:
|
| + scoped_ptr<ArcSettingsServiceImpl> impl_;
|
| +
|
| + DISALLOW_COPY_AND_ASSIGN(ArcSettingsService);
|
| +};
|
| +
|
| +} // namespace arc
|
| +
|
| +#endif // CHROME_BROWSER_CHROMEOS_ARC_ARC_SETTINGS_SERVICE_H_
|
|
|