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

Side by Side 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 unified diff | 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 »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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 IOS_CHROME_BROWSER_UI_WEBUI_CRASHES_UI_H_ 5 #ifndef IOS_CHROME_BROWSER_UI_WEBUI_FLAGS_UI_H_
6 #define IOS_CHROME_BROWSER_UI_WEBUI_CRASHES_UI_H_ 6 #define IOS_CHROME_BROWSER_UI_WEBUI_FLAGS_UI_H_
7 7
8 #include "base/macros.h" 8 #include "base/macros.h"
9 #include "base/memory/weak_ptr.h"
9 #include "ios/public/provider/web/web_ui_ios_controller.h" 10 #include "ios/public/provider/web/web_ui_ios_controller.h"
10 #include "ui/base/layout.h" 11 #include "ui/base/layout.h"
11 12
12 namespace base { 13 namespace base {
13 class RefCountedMemory; 14 class RefCountedMemory;
14 } 15 }
15 16
16 namespace web { 17 class BaseFlagsUI : public web::WebUIIOSController {
17 class WebUIIOS; 18 public:
18 } 19 enum FlagsUIKind {
20 FLAGS_UI_GENERIC,
21 FLAGS_UI_APPLE,
22 };
19 23
20 class CrashesUI : public web::WebUIIOSController { 24 BaseFlagsUI(web::WebUIIOS* web_ui, FlagsUIKind flags_ui_kind);
21 public: 25 ~BaseFlagsUI() override;
22 explicit CrashesUI(web::WebUIIOS* web_ui);
23 26
24 static base::RefCountedMemory* GetFaviconResourceBytes( 27 static base::RefCountedMemory* GetFaviconResourceBytes(
25 ui::ScaleFactor scale_factor); 28 ui::ScaleFactor scale_factor);
26 29
27 private: 30 private:
28 DISALLOW_COPY_AND_ASSIGN(CrashesUI); 31 void Initialize(web::WebUIIOS* web_ui, FlagsUIKind flags_ui_kind);
32
33 base::WeakPtrFactory<BaseFlagsUI> weak_factory_;
34
35 DISALLOW_COPY_AND_ASSIGN(BaseFlagsUI);
29 }; 36 };
30 37
31 #endif // CHROME_BROWSER_UI_WEBUI_CRASHES_UI_H_ 38 class FlagsUI : public BaseFlagsUI {
39 public:
40 explicit FlagsUI(web::WebUIIOS* web_ui);
41 ~FlagsUI() override;
42
43 private:
44 DISALLOW_COPY_AND_ASSIGN(FlagsUI);
45 };
46
47 class AppleFlagsUI : public BaseFlagsUI {
48 public:
49 explicit AppleFlagsUI(web::WebUIIOS* web_ui);
50 ~AppleFlagsUI() override;
51
52 private:
53 DISALLOW_COPY_AND_ASSIGN(AppleFlagsUI);
54 };
55
56 #endif // IOS_CHROME_BROWSER_UI_WEBUI_FLAGS_UI_H_
OLDNEW
« 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