diff options
author | xdai <xdai@chromium.org> | 2014-12-01 17:42:31 -0800 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2014-12-02 01:42:55 +0000 |
commit | aa7464ce69f9598b34cc7d634028fc7a26c4e0a3 (patch) | |
tree | c1088a6081f90a195c01b526da2dddfbbef09159 | |
parent | 44c1abae229a55e5f04fa9e909053575c20f1ffb (diff) | |
download | chromium_src-aa7464ce69f9598b34cc7d634028fc7a26c4e0a3.zip chromium_src-aa7464ce69f9598b34cc7d634028fc7a26c4e0a3.tar.gz chromium_src-aa7464ce69f9598b34cc7d634028fc7a26c4e0a3.tar.bz2 |
Fix the issue that feedback window launches on wrong desktop for teleported window.
patch from issue 734903003 at patchset 80001 (http://crrev.com/734903003#ps80001)
BUG=352927
Review URL: https://codereview.chromium.org/738303003
Cr-Commit-Position: refs/heads/master@{#306318}
-rw-r--r-- | chrome/browser/feedback/show_feedback_page.cc | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/chrome/browser/feedback/show_feedback_page.cc b/chrome/browser/feedback/show_feedback_page.cc index 828dee0..e8fe488 100644 --- a/chrome/browser/feedback/show_feedback_page.cc +++ b/chrome/browser/feedback/show_feedback_page.cc @@ -8,7 +8,10 @@ #include "chrome/browser/extensions/api/feedback_private/feedback_private_api.h" #include "chrome/browser/profiles/profile.h" #include "chrome/browser/profiles/profile_manager.h" +#include "chrome/browser/ui/ash/multi_user/multi_user_util.h" +#include "chrome/browser/ui/ash/multi_user/multi_user_window_manager.h" #include "chrome/browser/ui/browser_finder.h" +#include "chrome/browser/ui/browser_window.h" #include "chrome/browser/ui/tabs/tab_strip_model.h" #include "content/public/browser/web_contents.h" #include "url/gurl.h" @@ -61,6 +64,20 @@ void ShowFeedbackPage(Browser* browser, profile = profile->GetOriginalProfile(); DCHECK(profile); +#if defined(OS_CHROMEOS) + // Obtains the display profile ID on which the Feedback window should show. + chrome::MultiUserWindowManager* const window_manager = + chrome::MultiUserWindowManager::GetInstance(); + const std::string display_profile_id = + window_manager && browser + ? window_manager->GetUserPresentingWindow( + browser->window()->GetNativeWindow()) + : ""; + profile = display_profile_id.empty() + ? profile + : multi_user_util::GetProfileFromUserID(display_profile_id); +#endif + extensions::FeedbackPrivateAPI* api = extensions::FeedbackPrivateAPI::GetFactoryInstance()->Get(profile); |