From 76af173df21260cd16aaa05a2a804ae84551c17b Mon Sep 17 00:00:00 2001 From: "hirono@chromium.org" Date: Wed, 22 May 2013 07:49:37 +0000 Subject: Make ShellWindowRegistry#shell_windows_ sorted by the last time when the window is activated. This change enables us to get the latest activated window from shell_windows_. This CL includes following changes: * Changes the type of shell_windows_ from set to list. * Added 'ShellWindowRegistry#ShellWindowActivated' function that is called from shell window when it is activated. BUG=238901 Review URL: https://chromiumcodereview.appspot.com/14949019 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@201465 0039d316-1c4b-4281-b951-d872f2087c98 --- apps/app_shim/app_shim_host_mac.cc | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'apps') diff --git a/apps/app_shim/app_shim_host_mac.cc b/apps/app_shim/app_shim_host_mac.cc index bfe28f9..822a1b0 100644 --- a/apps/app_shim/app_shim_host_mac.cc +++ b/apps/app_shim/app_shim_host_mac.cc @@ -81,10 +81,11 @@ void AppShimHost::OnFocus() { return; extensions::ShellWindowRegistry* registry = extensions::ShellWindowRegistry::Get(profile_); - const std::set windows = + const extensions::ShellWindowRegistry::ShellWindowList windows = registry->GetShellWindowsForApp(app_id_); std::set native_windows; - for (std::set::const_iterator i = windows.begin(); + for (extensions::ShellWindowRegistry::ShellWindowList::const_iterator i = + windows.begin(); i != windows.end(); ++i) { native_windows.insert((*i)->GetNativeWindow()); -- cgit v1.1