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

Unified Diff: chrome/browser/ui/panels/panel_manager.cc

Issue 8183005: Choose the right window to switch to when a panel is deactivated on Windows. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 9 years, 2 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
« no previous file with comments | « chrome/browser/ui/panels/panel_manager.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/panels/panel_manager.cc
===================================================================
--- chrome/browser/ui/panels/panel_manager.cc (revision 104349)
+++ chrome/browser/ui/panels/panel_manager.cc (working copy)
@@ -10,6 +10,7 @@
#include "base/memory/scoped_ptr.h"
#include "base/message_loop.h"
#include "chrome/browser/ui/browser.h"
+#include "chrome/browser/ui/browser_list.h"
#include "chrome/browser/ui/window_sizer.h"
namespace {
@@ -523,6 +524,20 @@
return bottom;
}
+BrowserWindow* PanelManager::GetNextBrowserWindowToActivate(
+ Panel* panel) const {
+ // Find the last active browser window that is not minimized.
+ BrowserList::const_reverse_iterator iter = BrowserList::begin_last_active();
+ BrowserList::const_reverse_iterator end = BrowserList::end_last_active();
+ for (; (iter != end); ++iter) {
+ Browser* browser = *iter;
+ if (panel->browser() != browser && !browser->window()->IsMinimized())
+ return browser->window();
+ }
+
+ return NULL;
+}
+
void PanelManager::OnMouseMove(const gfx::Point& mouse_position) {
bool bring_up_titlebars = ShouldBringUpTitlebars(mouse_position.x(),
mouse_position.y());
« no previous file with comments | « chrome/browser/ui/panels/panel_manager.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698