Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(420)

Side by Side Diff: chrome/browser/extensions/api/declarative/declarative_api.cc

Issue 9192029: Bindings layer for declarative events API (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Check whether eventName may be optional Created 8 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
(Empty)
1 // Copyright (c) 2012 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 #include "chrome/browser/extensions/api/declarative/declarative_api.h"
6
7 #include "base/values.h"
8
9 namespace extensions {
10
11 bool AddRulesFunction::RunImpl() {
12 // LOG(ERROR) << "AddRulesFunction called";
13
14 ListValue* rules_list = NULL;
15 EXTENSION_FUNCTION_VALIDATE(args_->GetList(1, &rules_list));
16
17 // TODO(battre): Generate unique IDs and priorities here.
18
19 result_.reset(rules_list->DeepCopy());
20 return true;
21 }
22
23 bool RemoveRulesFunction::RunImpl() {
24 // LOG(ERROR) << "RemoveRulesFunction called";
25 return true;
26 }
27
28 bool GetRulesFunction::RunImpl() {
29 // LOG(ERROR) << "GetRulesFunction called";
30 result_.reset(new ListValue());
31 return true;
32 }
33
34 } // namespace extensions
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698