Chromium Code Reviews| Index: chrome/browser/ui/webui/md_feedback/md_feedback_dialog_controller.h |
| diff --git a/chrome/browser/ui/webui/md_feedback/md_feedback_dialog_controller.h b/chrome/browser/ui/webui/md_feedback/md_feedback_dialog_controller.h |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..a961b72d1a854f5686ac53b9ad358b65461c4678 |
| --- /dev/null |
| +++ b/chrome/browser/ui/webui/md_feedback/md_feedback_dialog_controller.h |
| @@ -0,0 +1,32 @@ |
| +// Copyright 2016 The Chromium Authors. All rights reserved. |
| +// Use of this source code is governed by a BSD-style license that can be |
| +// found in the LICENSE file. |
| + |
| +#ifndef CHROME_BROWSER_UI_WEBUI_MD_FEEDBACK_MD_FEEDBACK_DIALOG_CONTROLLER_H_ |
| +#define CHROME_BROWSER_UI_WEBUI_MD_FEEDBACK_MD_FEEDBACK_DIALOG_CONTROLLER_H_ |
| + |
| +#include "base/memory/singleton.h" |
| +#include "content/public/browser/browser_context.h" |
| + |
| +// This class manages MD Feedback dialog creation, destruction, and showing a |
|
afakhry
2016/08/09 23:36:31
Nit: you can just say "Manages ...". :)
apacible
2016/08/10 00:11:23
Done.
|
| +// constrained web dialog with the feedback contents. This controller is |
| +// implemented as a singleton. |
| +class MdFeedbackDialogController { |
| + public: |
| + // Return the singleton instance of MdFeedbackDialogController. |
|
afakhry
2016/08/09 23:36:31
Nit: you can safely remove this comment. It's unde
apacible
2016/08/10 00:11:23
Done.
|
| + static MdFeedbackDialogController* GetInstance(); |
| + |
| + // Show the feedback dialog. This WebUI dialog is not anchored to the browser |
| + // window but tied to a profile. |
| + void Show(content::BrowserContext* browser_context); |
| + |
| + private: |
| + friend struct base::DefaultSingletonTraits<MdFeedbackDialogController>; |
| + |
| + MdFeedbackDialogController(); |
| + ~MdFeedbackDialogController() = default; |
| + |
| + DISALLOW_COPY_AND_ASSIGN(MdFeedbackDialogController); |
| +}; |
| + |
| +#endif // CHROME_BROWSER_UI_WEBUI_MD_FEEDBACK_MD_FEEDBACK_DIALOG_CONTROLLER_H_ |