OLD | NEW |
(Empty) | |
| 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. |
| 4 |
| 5 #ifndef COMPONENTS_DOM_DISTILLER_WEBUI_DOM_DISTILLER_HANDLER_H_ |
| 6 #define COMPONENTS_DOM_DISTILLER_WEBUI_DOM_DISTILLER_HANDLER_H_ |
| 7 |
| 8 #include <vector> |
| 9 |
| 10 #include "base/memory/weak_ptr.h" |
| 11 #include "base/values.h" |
| 12 #include "content/public/browser/web_ui_message_handler.h" |
| 13 |
| 14 namespace dom_distiller { |
| 15 |
| 16 // Handler class for DOM Distiller page operations. |
| 17 class DomDistillerHandler : public content::WebUIMessageHandler { |
| 18 public: |
| 19 DomDistillerHandler(); |
| 20 virtual ~DomDistillerHandler(); |
| 21 |
| 22 // content::WebUIMessageHandler implementation. |
| 23 virtual void RegisterMessages() OVERRIDE; |
| 24 |
| 25 // Callback for the "requestEntries" message. This synchronously requests the |
| 26 // list of entries and returns it to the front end. |
| 27 virtual void HandleRequestEntries(const ListValue* args); |
| 28 |
| 29 private: |
| 30 // Factory for the creating refs in callbacks. |
| 31 base::WeakPtrFactory<DomDistillerHandler> weak_ptr_factory_; |
| 32 |
| 33 DISALLOW_COPY_AND_ASSIGN(DomDistillerHandler); |
| 34 }; |
| 35 |
| 36 } // namespace dom_distiller |
| 37 |
| 38 #endif // COMPONENTS_DOM_DISTILLER_WEBUI_DOM_DISTILLER_HANDLER_H_ |
OLD | NEW |