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

Unified Diff: chrome/browser/ui/views/extensions/chooser_dialog_view.cc

Issue 2478863003: Fix the Web Bluetooth chooser when it is used on Chrome apps on non-Mac (Closed)
Patch Set: removed unnecessary include files Created 4 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
Index: chrome/browser/ui/views/extensions/chooser_dialog_view.cc
diff --git a/chrome/browser/ui/views/extensions/chooser_dialog_view.cc b/chrome/browser/ui/views/extensions/chooser_dialog_view.cc
index da13e010d7215e23d6e69636f4ea58295043d320..5390708d044346a43d0469f258f6822a3875703d 100644
--- a/chrome/browser/ui/views/extensions/chooser_dialog_view.cc
+++ b/chrome/browser/ui/views/extensions/chooser_dialog_view.cc
@@ -11,8 +11,10 @@
#include "components/constrained_window/constrained_window_views.h"
#include "components/web_modal/web_contents_modal_dialog_manager.h"
#include "content/public/browser/browser_thread.h"
+#include "ui/gfx/geometry/insets.h"
#include "ui/views/controls/link.h"
#include "ui/views/controls/styled_label.h"
+#include "ui/views/layout/layout_constants.h"
#include "ui/views/window/dialog_client_view.h"
ChooserDialogView::ChooserDialogView(
@@ -64,6 +66,23 @@ views::View* ChooserDialogView::CreateFootnoteView() {
return chooser_content_view_->CreateFootnoteView();
}
+views::ClientView* ChooserDialogView::CreateClientView(views::Widget* widget) {
+ views::DialogClientView* client =
+ new views::DialogClientView(widget, GetContentsView());
+ client->set_button_row_insets(gfx::Insets());
+ return client;
+}
+
+views::NonClientFrameView* ChooserDialogView::CreateNonClientFrameView(
+ views::Widget* widget) {
+ if (ShouldUseCustomFrame()) {
sky 2016/11/07 16:13:06 How does this dialog look if !ShouldUseCustomFrame
juncai 2016/11/07 21:05:45 I tried it, and the chooser crashes the browser. S
sky 2016/11/07 22:01:04 Can you attach a screenshot for the !ShouldUseCust
juncai 2016/11/07 23:39:46 Changed return WidgetDelegate::CreateNonClientFram
+ return views::DialogDelegate::CreateDialogFrameView(
+ widget, gfx::Insets(views::kPanelVertMargin, views::kPanelHorizMargin,
+ views::kPanelVertMargin, views::kPanelHorizMargin));
+ }
+ return WidgetDelegate::CreateNonClientFrameView(widget);
+}
+
bool ChooserDialogView::Accept() {
chooser_content_view_->Accept();
return true;

Powered by Google App Engine
This is Rietveld 408576698