Index: ios/chrome/browser/ui/webui/flags_ui.h |
diff --git a/ios/chrome/browser/ui/webui/crashes_ui.h b/ios/chrome/browser/ui/webui/flags_ui.h |
similarity index 32% |
copy from ios/chrome/browser/ui/webui/crashes_ui.h |
copy to ios/chrome/browser/ui/webui/flags_ui.h |
index b0605a148c9bda08dc28b015d5fd828c5aa106f4..b8c96c55e88b4203c2dd09cfb1bda420d3c0e25a 100644 |
--- a/ios/chrome/browser/ui/webui/crashes_ui.h |
+++ b/ios/chrome/browser/ui/webui/flags_ui.h |
@@ -2,10 +2,11 @@ |
// Use of this source code is governed by a BSD-style license that can be |
// found in the LICENSE file. |
-#ifndef IOS_CHROME_BROWSER_UI_WEBUI_CRASHES_UI_H_ |
-#define IOS_CHROME_BROWSER_UI_WEBUI_CRASHES_UI_H_ |
+#ifndef IOS_CHROME_BROWSER_UI_WEBUI_FLAGS_UI_H_ |
+#define IOS_CHROME_BROWSER_UI_WEBUI_FLAGS_UI_H_ |
#include "base/macros.h" |
+#include "base/memory/weak_ptr.h" |
#include "ios/public/provider/web/web_ui_ios_controller.h" |
#include "ui/base/layout.h" |
@@ -13,19 +14,43 @@ namespace base { |
class RefCountedMemory; |
} |
-namespace web { |
-class WebUIIOS; |
-} |
- |
-class CrashesUI : public web::WebUIIOSController { |
+class BaseFlagsUI : public web::WebUIIOSController { |
public: |
- explicit CrashesUI(web::WebUIIOS* web_ui); |
+ enum FlagsUIKind { |
+ FLAGS_UI_GENERIC, |
+ FLAGS_UI_APPLE, |
+ }; |
+ |
+ BaseFlagsUI(web::WebUIIOS* web_ui, FlagsUIKind flags_ui_kind); |
+ ~BaseFlagsUI() override; |
static base::RefCountedMemory* GetFaviconResourceBytes( |
ui::ScaleFactor scale_factor); |
private: |
- DISALLOW_COPY_AND_ASSIGN(CrashesUI); |
+ void Initialize(web::WebUIIOS* web_ui, FlagsUIKind flags_ui_kind); |
+ |
+ base::WeakPtrFactory<BaseFlagsUI> weak_factory_; |
+ |
+ DISALLOW_COPY_AND_ASSIGN(BaseFlagsUI); |
+}; |
+ |
+class FlagsUI : public BaseFlagsUI { |
+ public: |
+ explicit FlagsUI(web::WebUIIOS* web_ui); |
+ ~FlagsUI() override; |
+ |
+ private: |
+ DISALLOW_COPY_AND_ASSIGN(FlagsUI); |
+}; |
+ |
+class AppleFlagsUI : public BaseFlagsUI { |
+ public: |
+ explicit AppleFlagsUI(web::WebUIIOS* web_ui); |
+ ~AppleFlagsUI() override; |
+ |
+ private: |
+ DISALLOW_COPY_AND_ASSIGN(AppleFlagsUI); |
}; |
-#endif // CHROME_BROWSER_UI_WEBUI_CRASHES_UI_H_ |
+#endif // IOS_CHROME_BROWSER_UI_WEBUI_FLAGS_UI_H_ |