| OLD | NEW |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef CHROME_BROWSER_UI_WEBUI_MD_FEEDBACK_MD_FEEDBACK_UI_H_ | 5 #ifndef CHROME_BROWSER_UI_WEBUI_MD_FEEDBACK_MD_FEEDBACK_UI_H_ |
| 6 #define CHROME_BROWSER_UI_WEBUI_MD_FEEDBACK_MD_FEEDBACK_UI_H_ | 6 #define CHROME_BROWSER_UI_WEBUI_MD_FEEDBACK_MD_FEEDBACK_UI_H_ |
| 7 | 7 |
| 8 #include "base/macros.h" | 8 #include "base/macros.h" |
| 9 #include "content/public/browser/web_ui_controller.h" | 9 #include "content/public/browser/web_ui_controller.h" |
| 10 | 10 |
| 11 namespace content { | 11 namespace content { |
| 12 class BrowserContext; | 12 class BrowserContext; |
| 13 } // namespace content | 13 } // namespace content |
| 14 | 14 |
| 15 class MdFeedbackWebUIMessageHandler; |
| 16 |
| 15 // The WebUI for chrome://feedback. | 17 // The WebUI for chrome://feedback. |
| 16 class MdFeedbackUI : public content::WebUIController { | 18 class MdFeedbackUI : public content::WebUIController { |
| 17 public: | 19 public: |
| 18 explicit MdFeedbackUI(content::WebUI* web_ui); | 20 explicit MdFeedbackUI(content::WebUI* web_ui); |
| 19 ~MdFeedbackUI() override; | 21 ~MdFeedbackUI() override; |
| 20 private: | 22 private: |
| 23 // Owned by the |web_ui| passed in the ctor, and guaranteed to be deleted |
| 24 // only after it has deleted |this|. |
| 25 MdFeedbackWebUIMessageHandler* handler_; |
| 26 |
| 21 DISALLOW_COPY_AND_ASSIGN(MdFeedbackUI); | 27 DISALLOW_COPY_AND_ASSIGN(MdFeedbackUI); |
| 22 }; | 28 }; |
| 23 | 29 |
| 24 // Create and show a web dialog with the MD feedback UI. | 30 // Create and show a web dialog with the MD feedback UI. |
| 25 // |browser_context| Is used to constructed the HTML dialog's WebContents. | 31 // |browser_context| Is used to constructed the HTML dialog's WebContents. |
| 26 void ShowFeedbackWebDialog( | 32 void ShowFeedbackWebDialog( |
| 27 content::BrowserContext* browser_context); | 33 content::BrowserContext* browser_context); |
| 28 | 34 |
| 29 #endif // CHROME_BROWSER_UI_WEBUI_MD_FEEDBACK_MD_FEEDBACK_UI_H_ | 35 #endif // CHROME_BROWSER_UI_WEBUI_MD_FEEDBACK_MD_FEEDBACK_UI_H_ |
| OLD | NEW |