Merge Chromium + Blink git repositories
[chromium-blink-merge.git] / chrome / browser / ui / webui / memory_internals / memory_internals_handler.h
blob9b7ef318cf9dd9340a326118e89a91890089c77c
1 // Copyright 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
5 #ifndef CHROME_BROWSER_UI_WEBUI_MEMORY_INTERNALS_MEMORY_INTERNALS_HANDLER_H_
6 #define CHROME_BROWSER_UI_WEBUI_MEMORY_INTERNALS_MEMORY_INTERNALS_HANDLER_H_
8 #include <string>
10 #include "base/compiler_specific.h"
11 #include "base/memory/ref_counted.h"
12 #include "content/public/browser/web_ui_message_handler.h"
14 namespace base {
15 class ListValue;
18 class MemoryInternalsProxy;
20 // This class handles messages to and from MemoryInternalsUI.
21 // It does all its work on the IO thread through the proxy below.
22 class MemoryInternalsHandler : public content::WebUIMessageHandler {
23 public:
24 MemoryInternalsHandler();
25 ~MemoryInternalsHandler() override;
27 void RegisterMessages() override;
29 // JavaScript message handlers.
30 void OnJSUpdate(const base::ListValue* list);
32 // MemoryInternals message handlers.
33 void OnUpdate(const base::string16& update);
35 private:
36 scoped_refptr<MemoryInternalsProxy> proxy_;
38 DISALLOW_COPY_AND_ASSIGN(MemoryInternalsHandler);
41 #endif // CHROME_BROWSER_UI_WEBUI_MEMORY_INTERNALS_MEMORY_INTERNALS_HANDLER_H_