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

Unified Diff: ui/app_list/views/contents_view.h

Issue 719203003: Parent the AppInfoDialog using a ModalDialogHost Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 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: ui/app_list/views/contents_view.h
diff --git a/ui/app_list/views/contents_view.h b/ui/app_list/views/contents_view.h
index 175d8326fd950e88ba8448f62b9518684e105268..e9e472de153ce458c255e337553495e869ff87de 100644
--- a/ui/app_list/views/contents_view.h
+++ b/ui/app_list/views/contents_view.h
@@ -12,6 +12,7 @@
#include "base/compiler_specific.h"
#include "base/memory/linked_ptr.h"
#include "base/memory/scoped_ptr.h"
+#include "components/web_modal/modal_dialog_host.h"
#include "ui/app_list/app_list_export.h"
#include "ui/app_list/app_list_model.h"
#include "ui/app_list/pagination_model.h"
@@ -44,7 +45,8 @@ class StartPageView;
// interface for switching between launcher pages, and animates the transition
// between them.
class APP_LIST_EXPORT ContentsView : public views::View,
- public PaginationModelObserver {
+ public PaginationModelObserver,
+ public web_modal::ModalDialogHost {
public:
ContentsView(AppListMainView* app_list_main_view);
~ContentsView() override;
@@ -131,6 +133,12 @@ class APP_LIST_EXPORT ContentsView : public views::View,
void TransitionStarted() override;
void TransitionChanged() override;
+ // Overridden from web_modal::ModalDialogHost:
+ gfx::NativeView GetHostView() const override;
+ gfx::Point GetDialogPosition(const gfx::Size& size) override;
+ void AddObserver(web_modal::ModalDialogHostObserver* observer) override;
+ void RemoveObserver(web_modal::ModalDialogHostObserver* observer) override;
+
private:
// Sets the active launcher page, accounting for whether the change is for
// search results.

Powered by Google App Engine
This is Rietveld 408576698