summaryrefslogtreecommitdiffstats
path: root/chrome/browser/extensions
diff options
context:
space:
mode:
authoraa@chromium.org <aa@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-05-14 02:08:32 +0000
committeraa@chromium.org <aa@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-05-14 02:08:32 +0000
commite134d4541d47cc812f487e13dc16201dabf1a006 (patch)
tree5bf0f6881cca8e007d645fd9699fb0cc7ca5ecf4 /chrome/browser/extensions
parentccac75726852954dbe516708c0b71d8e1e7e4fbb (diff)
downloadchromium_src-e134d4541d47cc812f487e13dc16201dabf1a006.zip
chromium_src-e134d4541d47cc812f487e13dc16201dabf1a006.tar.gz
chromium_src-e134d4541d47cc812f487e13dc16201dabf1a006.tar.bz2
Revert "implemented extensions api windows.update()."
This reverts commit f2d9a44f3886aeab1378c8dbc1ce445202bc0ca5. Review URL: http://codereview.chromium.org/115335 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@16030 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/extensions')
-rw-r--r--chrome/browser/extensions/extension_function_dispatcher.cc1
-rw-r--r--chrome/browser/extensions/extension_tabs_module.cc53
-rw-r--r--chrome/browser/extensions/extension_tabs_module.h3
3 files changed, 2 insertions, 55 deletions
diff --git a/chrome/browser/extensions/extension_function_dispatcher.cc b/chrome/browser/extensions/extension_function_dispatcher.cc
index b6943e9..bdc930a 100644
--- a/chrome/browser/extensions/extension_function_dispatcher.cc
+++ b/chrome/browser/extensions/extension_function_dispatcher.cc
@@ -61,7 +61,6 @@ FactoryRegistry::FactoryRegistry() {
&NewExtensionFunction<GetLastFocusedWindowFunction>;
factories_["GetAllWindows"] = &NewExtensionFunction<GetAllWindowsFunction>;
factories_["CreateWindow"] = &NewExtensionFunction<CreateWindowFunction>;
- factories_["UpdateWindow"] = &NewExtensionFunction<UpdateWindowFunction>;
factories_["RemoveWindow"] = &NewExtensionFunction<RemoveWindowFunction>;
// Tabs
diff --git a/chrome/browser/extensions/extension_tabs_module.cc b/chrome/browser/extensions/extension_tabs_module.cc
index 09415f4..6e61976 100644
--- a/chrome/browser/extensions/extension_tabs_module.cc
+++ b/chrome/browser/extensions/extension_tabs_module.cc
@@ -253,55 +253,6 @@ bool CreateWindowFunction::RunImpl() {
return true;
}
-bool UpdateWindowFunction::RunImpl() {
- EXTENSION_FUNCTION_VALIDATE(args_->IsType(Value::TYPE_LIST));
- const ListValue* args = static_cast<const ListValue*>(args_);
- int window_id;
- EXTENSION_FUNCTION_VALIDATE(args->GetInteger(0, &window_id));
- DictionaryValue* update_props;
- EXTENSION_FUNCTION_VALIDATE(args->GetDictionary(1, &update_props));
-
- Browser* browser = GetBrowserInProfileWithId(profile(), window_id, &error_);
- if (!browser)
- return false;
-
- gfx::Rect bounds = browser->window()->GetNormalBounds();
- // Any part of the bounds can optionally be set by the caller.
- int bounds_val;
- if (update_props->HasKey(kLeftKey)) {
- EXTENSION_FUNCTION_VALIDATE(update_props->GetInteger(kLeftKey,
- &bounds_val));
- bounds.set_x(bounds_val);
- }
-
- if (update_props->HasKey(kTopKey)) {
- EXTENSION_FUNCTION_VALIDATE(update_props->GetInteger(kTopKey,
- &bounds_val));
- bounds.set_y(bounds_val);
- }
-
- if (update_props->HasKey(kWidthKey)) {
- EXTENSION_FUNCTION_VALIDATE(update_props->GetInteger(kWidthKey,
- &bounds_val));
- bounds.set_width(bounds_val);
- }
-
- if (update_props->HasKey(kHeightKey)) {
- EXTENSION_FUNCTION_VALIDATE(update_props->GetInteger(kHeightKey,
- &bounds_val));
- bounds.set_height(bounds_val);
- }
-
- // TODO(rafaelw): This call to SetBounds() ends up resulting in the target
- // window being activated (pushed to the front). On win32, this appears to be
- // the result of HWND event handling.
- browser->window()->SetBounds(bounds);
- // TODO(rafaelw): Support |focused|.
- result_.reset(CreateWindowValue(browser, false));
-
- return true;
-}
-
bool RemoveWindowFunction::RunImpl() {
int window_id;
EXTENSION_FUNCTION_VALIDATE(args_->GetAsInteger(&window_id));
@@ -625,10 +576,10 @@ static bool GetTabById(int tab_id, Profile* profile, Browser** browser,
if (ExtensionTabUtil::GetTabById(tab_id, profile, browser, tab_strip,
contents, tab_index))
return true;
-
+
if (error_message)
*error_message = ExtensionErrorUtils::FormatErrorMessage(
kTabNotFoundError, IntToString(tab_id));
-
+
return false;
}
diff --git a/chrome/browser/extensions/extension_tabs_module.h b/chrome/browser/extensions/extension_tabs_module.h
index 8a004185..b8763fc 100644
--- a/chrome/browser/extensions/extension_tabs_module.h
+++ b/chrome/browser/extensions/extension_tabs_module.h
@@ -45,9 +45,6 @@ class GetAllWindowsFunction : public SyncExtensionFunction {
class CreateWindowFunction : public SyncExtensionFunction {
virtual bool RunImpl();
};
-class UpdateWindowFunction : public SyncExtensionFunction {
- virtual bool RunImpl();
-};
class RemoveWindowFunction : public SyncExtensionFunction {
virtual bool RunImpl();
};