Home | History | Annotate | Download | only in extensions
      1 // Copyright (c) 2011 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_EXTENSIONS_INFO_PRIVATE_API_H_
      6 #define CHROME_BROWSER_CHROMEOS_EXTENSIONS_INFO_PRIVATE_API_H_
      7 
      8 #include <string>
      9 
     10 #include "base/compiler_specific.h"
     11 #include "extensions/browser/extension_function.h"
     12 
     13 namespace base {
     14 class Value;
     15 }
     16 
     17 namespace extensions {
     18 
     19 class ChromeosInfoPrivateGetFunction : public AsyncExtensionFunction {
     20  public:
     21   ChromeosInfoPrivateGetFunction();
     22 
     23  protected:
     24   virtual ~ChromeosInfoPrivateGetFunction();
     25 
     26   virtual bool RunImpl() OVERRIDE;
     27 
     28  private:
     29   // Returns a newly allocate value, or null.
     30   base::Value* GetValue(const std::string& property_name);
     31 
     32   DECLARE_EXTENSION_FUNCTION("chromeosInfoPrivate.get", CHROMEOSINFOPRIVATE_GET)
     33 };
     34 
     35 class ChromeosInfoPrivateSetFunction : public SyncExtensionFunction {
     36  public:
     37   ChromeosInfoPrivateSetFunction();
     38 
     39  protected:
     40   virtual ~ChromeosInfoPrivateSetFunction();
     41 
     42   virtual bool RunImpl() OVERRIDE;
     43 
     44  private:
     45   DECLARE_EXTENSION_FUNCTION("chromeosInfoPrivate.set", CHROMEOSINFOPRIVATE_SET)
     46 };
     47 
     48 
     49 }  // namespace extensions
     50 
     51 #endif  // CHROME_BROWSER_CHROMEOS_EXTENSIONS_INFO_PRIVATE_API_H_
     52