| OLD | NEW |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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 CHROME_BROWSER_UI_WEBUI_SNIPPETS_INTERNALS_MESSAGE_HANDLER_H_ | 5 #ifndef CHROME_BROWSER_UI_WEBUI_SNIPPETS_INTERNALS_MESSAGE_HANDLER_H_ |
| 6 #define CHROME_BROWSER_UI_WEBUI_SNIPPETS_INTERNALS_MESSAGE_HANDLER_H_ | 6 #define CHROME_BROWSER_UI_WEBUI_SNIPPETS_INTERNALS_MESSAGE_HANDLER_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 | 9 |
| 10 #include "base/macros.h" | 10 #include "base/macros.h" |
| (...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 44 void SendInitialData(); | 44 void SendInitialData(); |
| 45 void SendSnippets(); | 45 void SendSnippets(); |
| 46 void SendDiscardedSnippets(); | 46 void SendDiscardedSnippets(); |
| 47 void SendHosts(); | 47 void SendHosts(); |
| 48 void SendJson(const std::string& json); | 48 void SendJson(const std::string& json); |
| 49 void SendBoolean(const std::string& name, bool value); | 49 void SendBoolean(const std::string& name, bool value); |
| 50 void SendString(const std::string& name, const std::string& value); | 50 void SendString(const std::string& name, const std::string& value); |
| 51 | 51 |
| 52 ScopedObserver<ntp_snippets::NTPSnippetsService, | 52 ScopedObserver<ntp_snippets::NTPSnippetsService, |
| 53 ntp_snippets::NTPSnippetsServiceObserver> observer_; | 53 ntp_snippets::NTPSnippetsServiceObserver> observer_; |
| 54 |
| 55 // Tracks whether we can already send messages to the page. |
| 54 bool dom_loaded_; | 56 bool dom_loaded_; |
| 57 |
| 55 ntp_snippets::NTPSnippetsService* ntp_snippets_service_; | 58 ntp_snippets::NTPSnippetsService* ntp_snippets_service_; |
| 56 | 59 |
| 57 DISALLOW_COPY_AND_ASSIGN(SnippetsInternalsMessageHandler); | 60 DISALLOW_COPY_AND_ASSIGN(SnippetsInternalsMessageHandler); |
| 58 }; | 61 }; |
| 59 | 62 |
| 60 #endif // CHROME_BROWSER_UI_WEBUI_SNIPPETS_INTERNALS_MESSAGE_HANDLER_H_ | 63 #endif // CHROME_BROWSER_UI_WEBUI_SNIPPETS_INTERNALS_MESSAGE_HANDLER_H_ |
| OLD | NEW |