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

Issue 719203003: Parent the AppInfoDialog using a ModalDialogHost

Created:
6 years, 1 month ago by tapted
Modified:
6 years, 1 month ago
Reviewers:
CC:
chromium-reviews, chrome-apps-syd-reviews_chromium.org, extensions-reviews_chromium.org, sadrul, tfarina, kalyank, chromium-apps-reviews_chromium.org, mac-views-reviews_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Project:
chromium
Visibility:
Public.

Description

Parent the AppInfoDialog using a ModalDialogHost On Mac (both with and without MacViews) web_contents()-> GetTopLevelNativeWindow() can return NULL. So it is not valid for (e.g.) extension_settings_handler.cc use this as a parent window for the AppInfoDialog. Also, in general, parenting off a gfx::NativeWindow is bad, since the lifetime is hard to control. This CL introduces - CreateModalDialogViews(views::DialogDelegate*, web_modal::ModalDialogHost*) which will eventually replace - CreateBrowserModalDialogViews(views::DialogDelegate*, gfx::NativeView); BUG=

Patch Set 1 #

Total comments: 1
Unified diffs Side-by-side diffs Delta from patch set Stats (+146 lines, -87 lines) Patch
M chrome/browser/ui/app_list/app_list_controller_delegate.h View 2 chunks +11 lines, -4 lines 0 comments Download
M chrome/browser/ui/app_list/app_list_controller_delegate.cc View 2 chunks +5 lines, -5 lines 0 comments Download
M chrome/browser/ui/app_list/app_list_controller_delegate_views.h View 1 chunk +2 lines, -1 line 0 comments Download
M chrome/browser/ui/app_list/app_list_controller_delegate_views.cc View 1 chunk +7 lines, -4 lines 0 comments Download
M chrome/browser/ui/apps/app_info_dialog.h View 2 chunks +8 lines, -13 lines 0 comments Download
M chrome/browser/ui/ash/app_list/app_list_controller_ash.h View 1 chunk +2 lines, -1 line 0 comments Download
M chrome/browser/ui/ash/app_list/app_list_controller_ash.cc View 1 chunk +8 lines, -4 lines 0 comments Download
M chrome/browser/ui/cocoa/apps/app_info_dialog_cocoa.mm View 1 chunk +5 lines, -14 lines 0 comments Download
M chrome/browser/ui/views/apps/app_info_dialog/app_info_dialog_views.h View 3 chunks +8 lines, -2 lines 0 comments Download
M chrome/browser/ui/views/apps/app_info_dialog/app_info_dialog_views.cc View 2 chunks +10 lines, -30 lines 0 comments Download
M chrome/browser/ui/views/apps/app_info_dialog/app_info_footer_panel.h View 2 chunks +2 lines, -2 lines 0 comments Download
M chrome/browser/ui/views/apps/app_info_dialog/app_info_footer_panel.cc View 3 chunks +4 lines, -4 lines 0 comments Download
M chrome/browser/ui/webui/extensions/extension_settings_handler.cc View 2 chunks +4 lines, -2 lines 0 comments Download
M components/constrained_window/constrained_window_views.h View 1 chunk +10 lines, -0 lines 0 comments Download
M components/constrained_window/constrained_window_views.cc View 2 chunks +18 lines, -0 lines 0 comments Download
M components/web_modal/popup_manager.h View 1 chunk +2 lines, -0 lines 0 comments Download
M ui/app_list/DEPS View 1 chunk +1 line, -0 lines 0 comments Download
M ui/app_list/app_list.gyp View 1 chunk +1 line, -0 lines 1 comment Download
M ui/app_list/views/app_list_view.h View 2 chunks +6 lines, -0 lines 0 comments Download
M ui/app_list/views/app_list_view.cc View 1 chunk +4 lines, -0 lines 0 comments Download
M ui/app_list/views/contents_view.h View 3 chunks +9 lines, -1 line 0 comments Download
M ui/app_list/views/contents_view.cc View 2 chunks +19 lines, -0 lines 0 comments Download

Messages

Total messages: 3 (0 generated)
tapted
(not for review) Hi Andre - this is what I was thinking for the app ...
6 years, 1 month ago (2014-11-13 07:26:25 UTC) #1
Andre
On 2014/11/13 07:26:25, tapted wrote: > (not for review) > > Hi Andre - this ...
6 years, 1 month ago (2014-11-13 21:53:36 UTC) #2
Andre
6 years, 1 month ago (2014-11-18 23:42:58 UTC) #3
On 2014/11/13 07:26:25, tapted wrote:
> (not for review)
> 
> Hi Andre - this is what I was thinking for the app list dialog
> 
> but it's currently blocked on making `web_modal` a proper shared component.
> (this actually shouldn't be too hard..)
> 
> An alternative might be to make the AppListViewDelegate in chrome/browser/ui
the
> ModalDialogHost, and "pretend" to the ModalDialogHostObserver that it's
getting
> destroyed whenever the profile changes.
> 
> https://codereview.chromium.org/719203003/diff/1/ui/app_list/app_list.gyp
> File ui/app_list/app_list.gyp (right):
> 
>
https://codereview.chromium.org/719203003/diff/1/ui/app_list/app_list.gyp#new...
> ui/app_list/app_list.gyp:190: '../../components/components.gyp:web_modal',
> unfortunately `web_modal` isn't a proper component -- it's just a static
> library. So this is currently blocked on making it a shared library, with
> WEB_MODAL_EXPORT and all that jazz.

Thinking about this some more.
I actually like the idea of making AppListViewDelegate the ModalDialogHost.
It minimizes app_list's dependency, and I'm not sure something like
AppListContentsView
should know anything about modal dialogs.

Powered by Google App Engine
This is Rietveld 408576698