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

Unified Diff: chrome/browser/ui/views/color_chooser_aura.cc

Issue 65733002: Make ColorChooserAura browser modal, not always-on-top. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Make the chooser browser window modal. Created 7 years, 1 month 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/views/color_chooser_aura.cc
diff --git a/chrome/browser/ui/views/color_chooser_aura.cc b/chrome/browser/ui/views/color_chooser_aura.cc
index 637b367a57feac1473c1308d47e7eaffaa2e330b..48d73a2dae93ffa305997f47c2cac2f6a6d83bbe 100644
--- a/chrome/browser/ui/views/color_chooser_aura.cc
+++ b/chrome/browser/ui/views/color_chooser_aura.cc
@@ -3,6 +3,8 @@
// found in the LICENSE file.
#include "chrome/browser/ui/browser_dialogs.h"
+#include "chrome/browser/ui/browser_finder.h"
+#include "chrome/browser/ui/browser_window.h"
#include "content/public/browser/color_chooser.h"
#include "content/public/browser/web_contents.h"
#include "content/public/browser/web_contents_view.h"
@@ -10,7 +12,6 @@
#include "ui/views/color_chooser/color_chooser_view.h"
#include "ui/views/widget/widget.h"
-
namespace {
class ColorChooserAura : public content::ColorChooser,
@@ -55,9 +56,9 @@ ColorChooserAura::ColorChooserAura(content::WebContents* web_contents,
SkColor initial_color)
: web_contents_(web_contents) {
view_ = new views::ColorChooserView(this, initial_color);
- widget_ = views::Widget::CreateWindowWithContext(
- view_, web_contents->GetView()->GetNativeView());
- widget_->SetAlwaysOnTop(true);
+ Browser* browser = chrome::FindBrowserWithWebContents(web_contents);
+ widget_ = views::Widget::CreateWindowWithParent(
+ view_, browser->window()->GetNativeWindow());
widget_->Show();
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698