blob: 76d877224a4ef9d076cf8bfe0f0b7d498a18d57e (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
|
// Copyright (c) 2014 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/content_switches_internal.h"
#include "base/command_line.h"
#include "content/public/common/content_switches.h"
#if defined(OS_WIN)
#include "base/win/windows_version.h"
#endif
namespace content {
bool IsPinchToZoomEnabled() {
const base::CommandLine& command_line =
*base::CommandLine::ForCurrentProcess();
// --disable-pinch should always disable pinch
if (command_line.HasSwitch(switches::kDisablePinch))
return false;
#if defined(OS_WIN)
return base::win::GetVersion() >= base::win::VERSION_WIN8;
#elif defined(OS_CHROMEOS)
return true;
#else
return command_line.HasSwitch(switches::kEnableViewport) ||
command_line.HasSwitch(switches::kEnablePinch);
#endif
}
} // namespace content
|