Ignore non-active fullscreen windows for shelf state.
[chromium-blink-merge.git] / extensions / common / features / feature.cc
blob60f7f88929c345e6b07bdb3c49b190bb767e7fba
1 // Copyright 2013 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.
5 #include "extensions/common/features/feature.h"
7 #include <map>
9 #include "base/command_line.h"
10 #include "base/lazy_instance.h"
11 #include "base/strings/string_util.h"
12 #include "base/strings/stringprintf.h"
14 namespace extensions {
16 // static
17 Feature::Platform Feature::GetCurrentPlatform() {
18 #if defined(OS_CHROMEOS)
19 return CHROMEOS_PLATFORM;
20 #elif defined(OS_LINUX)
21 return LINUX_PLATFORM;
22 #elif defined(OS_MACOSX)
23 return MACOSX_PLATFORM;
24 #elif defined(OS_WIN)
25 return WIN_PLATFORM;
26 #else
27 return UNSPECIFIED_PLATFORM;
28 #endif
31 // static
32 Feature::Location Feature::ConvertLocation(Manifest::Location location) {
33 if (location == Manifest::COMPONENT)
34 return COMPONENT_LOCATION;
35 else
36 return UNSPECIFIED_LOCATION;
39 // static
40 Feature::Availability Feature::CreateAvailability(AvailabilityResult result,
41 const std::string& message) {
42 return Availability(result, message);
45 Feature::Feature() : no_parent_(false) {}
47 Feature::~Feature() {}
49 } // namespace extensions