summaryrefslogtreecommitdiffstats
path: root/chrome/browser/extensions/extension_tabs_module.cc
diff options
context:
space:
mode:
authormpcomplete@chromium.org <mpcomplete@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-04-30 16:42:59 +0000
committermpcomplete@chromium.org <mpcomplete@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-04-30 16:42:59 +0000
commitec2717e405abc8f618133fe3c9f5051fff224e71 (patch)
tree0bb6b7fc4b181d1886892e24ab5f379795c4ab3c /chrome/browser/extensions/extension_tabs_module.cc
parente8380f5ba7f302b6b2b9012e20f40c96b5136599 (diff)
downloadchromium_src-ec2717e405abc8f618133fe3c9f5051fff224e71.zip
chromium_src-ec2717e405abc8f618133fe3c9f5051fff224e71.tar.gz
chromium_src-ec2717e405abc8f618133fe3c9f5051fff224e71.tar.bz2
Have extension call windows.getLastFocused include incognito windows if the
extension is enabled for incognito. BUG=39113 Review URL: http://codereview.chromium.org/1789010 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@46076 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/extensions/extension_tabs_module.cc')
-rw-r--r--chrome/browser/extensions/extension_tabs_module.cc3
1 files changed, 2 insertions, 1 deletions
diff --git a/chrome/browser/extensions/extension_tabs_module.cc b/chrome/browser/extensions/extension_tabs_module.cc
index 6a9c86b..6912e25 100644
--- a/chrome/browser/extensions/extension_tabs_module.cc
+++ b/chrome/browser/extensions/extension_tabs_module.cc
@@ -263,7 +263,8 @@ bool GetCurrentWindowFunction::RunImpl() {
}
bool GetLastFocusedWindowFunction::RunImpl() {
- Browser* browser = BrowserList::GetLastActiveWithProfile(profile());
+ Browser* browser = BrowserList::FindBrowserWithType(
+ profile(), Browser::TYPE_ANY, include_incognito());
if (!browser) {
error_ = keys::kNoLastFocusedWindowError;
return false;