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

Unified Diff: ios/chrome/browser/ui/webui/flags_ui.h

Issue 1500533002: Upstream chrome://flags & chrome://ui-alternatives iOS WebUI. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Add components/flags_ui/resources/apple_flags.css to PRESUBMIT blacklist Created 5 years 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
« no previous file with comments | « ios/chrome/browser/BUILD.gn ('k') | ios/chrome/browser/ui/webui/flags_ui.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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_
« no previous file with comments | « ios/chrome/browser/BUILD.gn ('k') | ios/chrome/browser/ui/webui/flags_ui.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698