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

Unified Diff: chrome/browser/extensions/extension_function.cc

Issue 1527015: Support PNG and quality control in chrome.tabs.captureVisibleTab(). (Closed)
Patch Set: Rebase for checkin. Created 10 years, 8 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/extensions/extension_function.h ('k') | chrome/browser/extensions/extension_tabs_module.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/extensions/extension_function.cc
diff --git a/chrome/browser/extensions/extension_function.cc b/chrome/browser/extensions/extension_function.cc
index 006fe9986425be7c8ca7ea55c25a8f7259c57883..f3193155914a5afa9d08d2b2201247151f2d9798 100644
--- a/chrome/browser/extensions/extension_function.cc
+++ b/chrome/browser/extensions/extension_function.cc
@@ -1,4 +1,4 @@
-// Copyright (c) 2009 The Chromium Authors. All rights reserved.
+// Copyright (c) 2010 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.
@@ -31,6 +31,13 @@ void AsyncExtensionFunction::SendResponse(bool success) {
}
}
+bool AsyncExtensionFunction::HasOptionalArgument(size_t index) {
+ DCHECK(args_->IsType(Value::TYPE_LIST));
+ ListValue* args_list = static_cast<ListValue*>(args_.get());
+ Value* value;
+ return args_list->Get(index, &value) && !value->IsType(Value::TYPE_NULL);
+}
+
std::string AsyncExtensionFunction::extension_id() {
DCHECK(dispatcher());
return dispatcher()->extension_id();
« no previous file with comments | « chrome/browser/extensions/extension_function.h ('k') | chrome/browser/extensions/extension_tabs_module.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698