| Index: content/common/compositor_util.cc
|
| diff --git a/content/common/compositor_util.cc b/content/common/compositor_util.cc
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..6cbd5ea85f920a575fdb23c0726b8b0e23b0f260
|
| --- /dev/null
|
| +++ b/content/common/compositor_util.cc
|
| @@ -0,0 +1,25 @@
|
| +// Copyright 2016 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.
|
| +
|
| +#include "content/common/compositor_util.h"
|
| +
|
| +#include "base/strings/string_number_conversions.h"
|
| +#include "cc/base/switches.h"
|
| +
|
| +namespace content {
|
| +
|
| +// static
|
| +void CompositorUtil::GenerateLayerTreeSettings(cc::LayerTreeSettings& settings,
|
| + const base::CommandLine& cmd) {
|
| + if (cmd.HasSwitch(cc::switches::kTopControlsShowThreshold)) {
|
| + std::string top_threshold_str =
|
| + cmd.GetSwitchValueASCII(cc::switches::kTopControlsShowThreshold);
|
| + double show_threshold;
|
| + if (base::StringToDouble(top_threshold_str, &show_threshold) &&
|
| + show_threshold >= 0.f && show_threshold <= 1.f)
|
| + settings.top_controls_show_threshold = show_threshold;
|
| + }
|
| +}
|
| +
|
| +} // namespace content
|
|
|