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

Unified Diff: chrome/browser/extensions/api/tabs/windows_util.cc

Issue 543873002: Add ChromeExtensionFunctionDetails (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 3 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
Index: chrome/browser/extensions/api/tabs/windows_util.cc
diff --git a/chrome/browser/extensions/api/tabs/windows_util.cc b/chrome/browser/extensions/api/tabs/windows_util.cc
index a2b640d6067e3ee01013855aa68cb7a6b56a4a54..0cb10e3bb38abd097234c9d7bfd29b3cff4c3d34 100644
--- a/chrome/browser/extensions/api/tabs/windows_util.cc
+++ b/chrome/browser/extensions/api/tabs/windows_util.cc
@@ -7,6 +7,7 @@
#include "base/strings/string_number_conversions.h"
#include "chrome/browser/extensions/api/tabs/tabs_constants.h"
#include "chrome/browser/extensions/chrome_extension_function.h"
+#include "chrome/browser/extensions/chrome_extension_function_details.h"
#include "chrome/browser/extensions/window_controller.h"
#include "chrome/browser/extensions/window_controller_list.h"
#include "extensions/browser/extension_function_dispatcher.h"
@@ -18,6 +19,7 @@ namespace windows_util {
bool GetWindowFromWindowID(ChromeUIThreadExtensionFunction* function,
int window_id,
extensions::WindowController** controller) {
+ ChromeExtensionFunctionDetails function_details(function);
if (window_id == extension_misc::kCurrentWindowId) {
extensions::WindowController* extension_window_controller =
function->dispatcher()->delegate()->GetExtensionWindowController();
@@ -26,16 +28,16 @@ bool GetWindowFromWindowID(ChromeUIThreadExtensionFunction* function,
*controller = extension_window_controller;
} else {
// Otherwise get the focused or most recently added window.
- *controller = extensions::WindowControllerList::GetInstance()->
- CurrentWindowForFunction(function);
+ *controller = extensions::WindowControllerList::GetInstance()
+ ->CurrentWindowForFunction(function_details);
}
if (!(*controller)) {
function->SetError(extensions::tabs_constants::kNoCurrentWindowError);
return false;
}
} else {
- *controller = extensions::WindowControllerList::GetInstance()->
- FindWindowForFunctionById(function, window_id);
+ *controller = extensions::WindowControllerList::GetInstance()
+ ->FindWindowForFunctionById(function_details, window_id);
if (!(*controller)) {
function->SetError(extensions::ErrorUtils::FormatErrorMessage(
extensions::tabs_constants::kWindowNotFoundError,
« no previous file with comments | « chrome/browser/extensions/api/tabs/tabs_api.cc ('k') | chrome/browser/extensions/chrome_extension_function.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698