summaryrefslogtreecommitdiffstats
path: root/chrome/browser/extensions/extension_tabs_module.cc
diff options
context:
space:
mode:
authormpcomplete@google.com <mpcomplete@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2009-06-05 19:07:01 +0000
committermpcomplete@google.com <mpcomplete@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2009-06-05 19:07:01 +0000
commit32dda3615ecec2a9f0ce3318658588b4103d997d (patch)
tree0705a3eeb8f48c52329a1dcc5804aee59d80966a /chrome/browser/extensions/extension_tabs_module.cc
parentc2f5dd7f69af7a59321e5acd1aa39fea5b2b2bfd (diff)
downloadchromium_src-32dda3615ecec2a9f0ce3318658588b4103d997d.zip
chromium_src-32dda3615ecec2a9f0ce3318658588b4103d997d.tar.gz
chromium_src-32dda3615ecec2a9f0ce3318658588b4103d997d.tar.bz2
Make AsyncExtensionFunction possible.
Change the bookmarks API to be async functions, so that they can delay their response until the bookmark system is loaded. BUG=12353 TEST=none Review URL: http://codereview.chromium.org/114079 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@17751 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/extensions/extension_tabs_module.cc')
-rw-r--r--chrome/browser/extensions/extension_tabs_module.cc14
1 files changed, 7 insertions, 7 deletions
diff --git a/chrome/browser/extensions/extension_tabs_module.cc b/chrome/browser/extensions/extension_tabs_module.cc
index ea1d3be..761e874 100644
--- a/chrome/browser/extensions/extension_tabs_module.cc
+++ b/chrome/browser/extensions/extension_tabs_module.cc
@@ -163,7 +163,7 @@ bool GetWindowFunction::RunImpl() {
}
bool GetCurrentWindowFunction::RunImpl() {
- Browser* browser = dispatcher_->GetBrowser();
+ Browser* browser = dispatcher()->GetBrowser();
if (!browser) {
error_ = keys::kNoCurrentWindowError;
return false;
@@ -231,7 +231,7 @@ bool CreateWindowFunction::RunImpl() {
// NOTE(rafaelw): It's ok if dispatcher_->GetBrowser() returns NULL here.
// GetBrowserWindowBounds will default to saved "default" values for the app.
WindowSizer::GetBrowserWindowBounds(std::wstring(), empty_bounds,
- dispatcher_->GetBrowser(), &bounds,
+ dispatcher()->GetBrowser(), &bounds,
&maximized);
// Any part of the bounds can optionally be set by the caller.
@@ -263,7 +263,7 @@ bool CreateWindowFunction::RunImpl() {
}
}
- Browser* new_window = Browser::Create(dispatcher_->profile());
+ Browser* new_window = Browser::Create(dispatcher()->profile());
new_window->AddTabWithURL(*(url.get()), GURL(), PageTransition::LINK, true,
-1, false, NULL);
@@ -351,7 +351,7 @@ bool GetSelectedTabFunction::RunImpl() {
EXTENSION_FUNCTION_VALIDATE(args_->GetAsInteger(&window_id));
browser = GetBrowserInProfileWithId(profile(), window_id, &error_);
} else {
- browser = dispatcher_->GetBrowser();
+ browser = dispatcher()->GetBrowser();
if (!browser)
error_ = keys::kNoCurrentWindowError;
}
@@ -361,7 +361,7 @@ bool GetSelectedTabFunction::RunImpl() {
TabStripModel* tab_strip = browser->tabstrip_model();
TabContents* contents = tab_strip->GetSelectedTabContents();
if (!contents) {
- error_ = keys::kNoSelectedTabError;
+ error_ = keys::kNoSelectedTabError;
return false;
}
result_.reset(ExtensionTabUtil::CreateTabValue(contents, tab_strip,
@@ -377,7 +377,7 @@ bool GetAllTabsInWindowFunction::RunImpl() {
EXTENSION_FUNCTION_VALIDATE(args_->GetAsInteger(&window_id));
browser = GetBrowserInProfileWithId(profile(), window_id, &error_);
} else {
- browser = dispatcher_->GetBrowser();
+ browser = dispatcher()->GetBrowser();
if (!browser)
error_ = keys::kNoCurrentWindowError;
}
@@ -401,7 +401,7 @@ bool CreateTabFunction::RunImpl() {
keys::kWindowIdKey, &window_id));
browser = GetBrowserInProfileWithId(profile(), window_id, &error_);
} else {
- browser = dispatcher_->GetBrowser();
+ browser = dispatcher()->GetBrowser();
if (!browser)
error_ = keys::kNoCurrentWindowError;
}