summaryrefslogtreecommitdiffstats
path: root/chrome/browser/task_manager.cc
diff options
context:
space:
mode:
authorrafaelw@chromium.org <rafaelw@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-02-04 16:08:29 +0000
committerrafaelw@chromium.org <rafaelw@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-02-04 16:08:29 +0000
commitf298901fdf7b438d12b776407026eec114e3682b (patch)
treeb0931bef4c62eca2a6b674d7f692d25694628edf /chrome/browser/task_manager.cc
parent3bd19b38ccaedafc2dd6dd8359b7a2083e7fdae7 (diff)
downloadchromium_src-f298901fdf7b438d12b776407026eec114e3682b.zip
chromium_src-f298901fdf7b438d12b776407026eec114e3682b.tar.gz
chromium_src-f298901fdf7b438d12b776407026eec114e3682b.tar.bz2
Step 1 in Implementing/Prototyping App Panels.
In this first step we 1) Create a new Browser::Type::TYPE_APP_PANEL which is observed in various places 2) Create an AppPanelBrowserFrame which is created in BrowserFrameWin when the TYPE_APP_PANEL is observed. AppPanelBrowserFrame draws itself per glen's mocks and will ultimately behave substantially different from regular browser windows. 3) Create a temporary command switch called --app-launch-as-panel which can be used until we implement actual app launching. Note that there is still work to be done "bit-twiddling" to match glen's mocks and to implement the "inactive" look for these windows. Steps 2 through N may include: different sizing behavior (based either on the content size or an api call), different min/maximize behavior, docking to the os taskbar, auto order & placement of app panels. A screen capture of the current implementation is attached to the bug. BUG=32361 Review URL: http://codereview.chromium.org/553143 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@38107 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/task_manager.cc')
-rw-r--r--chrome/browser/task_manager.cc15
1 files changed, 9 insertions, 6 deletions
diff --git a/chrome/browser/task_manager.cc b/chrome/browser/task_manager.cc
index a192600..7c6a62e 100644
--- a/chrome/browser/task_manager.cc
+++ b/chrome/browser/task_manager.cc
@@ -923,15 +923,18 @@ void TaskManager::OpenAboutMemory() {
browser->OpenURL(GURL(chrome::kAboutMemoryURL), GURL(), NEW_FOREGROUND_TAB,
PageTransition::LINK);
- // In case the browser window is minimzed, show it. If this is an
- // application or popup, we can only have one tab, hence we need to process
- // this in a tabbed browser window. Currently, |browser| is pointing to the
- // application, popup window. Therefore, we have to retrieve the last
- // active tab again, since a new window has been used.
- if (browser->type() & Browser::TYPE_APP_POPUP) {
+ // In case the browser window is minimzed, show it. If |browser| is a
+ // non-tabbed window, the call to OpenURL above will have opened a
+ // TabContents in a tabbed browser, so we need to grab it with GetLastActive
+ // before the call to show().
+ if (browser->type() & (Browser::TYPE_APP |
+ Browser::TYPE_APP_PANEL |
+ Browser::TYPE_DEVTOOLS |
+ Browser::TYPE_POPUP)) {
browser = BrowserList::GetLastActive();
DCHECK(browser);
}
+
browser->window()->Show();
}
}