summaryrefslogtreecommitdiffstats
path: root/chromium/chrome/browser/ui/webui/android/dev_ui_loader/dev_ui_loader_ui.h
blob: d8b70e7161593ff9545e35adb98943ce0d82cf07 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
// Copyright 2019 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_ANDROID_DEV_UI_LOADER_DEV_UI_LOADER_UI_H_
#define CHROME_BROWSER_UI_WEBUI_ANDROID_DEV_UI_LOADER_DEV_UI_LOADER_UI_H_

#include "base/memory/weak_ptr.h"
#include "build/build_config.h"
#include "chrome/android/features/dev_ui/buildflags.h"
#include "content/public/browser/web_ui_controller.h"

#if !defined(OS_ANDROID) || !BUILDFLAG(DFMIFY_DEV_UI)
#error Unsupported platform.
#endif

class GURL;

class DevUiLoaderUI : public content::WebUIController {
 public:
  DevUiLoaderUI(content::WebUI* web_ui_in, const GURL& url);
  ~DevUiLoaderUI() override;

 private:
  DevUiLoaderUI(const DevUiLoaderUI&) = delete;
  void operator=(const DevUiLoaderUI&) = delete;

  // Factory for creating references in callbacks.
  base::WeakPtrFactory<DevUiLoaderUI> weak_ptr_factory_{this};
};

#endif  // CHROME_BROWSER_UI_WEBUI_ANDROID_DEV_UI_LOADER_DEV_UI_LOADER_UI_H_