| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 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 | 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 #include "chrome/browser/ui/webui/chromeos/slow_ui.h" | 5 #include "chrome/browser/ui/webui/chromeos/slow_ui.h" |
| 6 | 6 |
| 7 #include <string> | 7 #include <string> |
| 8 | 8 |
| 9 #include "base/bind.h" | 9 #include "base/bind.h" |
| 10 #include "base/macros.h" | 10 #include "base/macros.h" |
| (...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 65 | 65 |
| 66 private: | 66 private: |
| 67 void UpdatePage(); | 67 void UpdatePage(); |
| 68 | 68 |
| 69 // Handlers for JS WebUI messages. | 69 // Handlers for JS WebUI messages. |
| 70 void HandleDisable(const base::ListValue* args); | 70 void HandleDisable(const base::ListValue* args); |
| 71 void HandleEnable(const base::ListValue* args); | 71 void HandleEnable(const base::ListValue* args); |
| 72 void LoadComplete(const base::ListValue* args); | 72 void LoadComplete(const base::ListValue* args); |
| 73 | 73 |
| 74 Profile* profile_; | 74 Profile* profile_; |
| 75 scoped_ptr<PrefChangeRegistrar> user_pref_registrar_; | 75 std::unique_ptr<PrefChangeRegistrar> user_pref_registrar_; |
| 76 | 76 |
| 77 DISALLOW_COPY_AND_ASSIGN(SlowHandler); | 77 DISALLOW_COPY_AND_ASSIGN(SlowHandler); |
| 78 }; | 78 }; |
| 79 | 79 |
| 80 // SlowHandler ------------------------------------------------------------ | 80 // SlowHandler ------------------------------------------------------------ |
| 81 | 81 |
| 82 SlowHandler::SlowHandler(Profile* profile) : profile_(profile) { | 82 SlowHandler::SlowHandler(Profile* profile) : profile_(profile) { |
| 83 } | 83 } |
| 84 | 84 |
| 85 SlowHandler::~SlowHandler() { | 85 SlowHandler::~SlowHandler() { |
| (...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 128 | 128 |
| 129 SlowHandler* handler = new SlowHandler(profile); | 129 SlowHandler* handler = new SlowHandler(profile); |
| 130 web_ui->AddMessageHandler(handler); | 130 web_ui->AddMessageHandler(handler); |
| 131 | 131 |
| 132 // Set up the chrome://slow/ source. | 132 // Set up the chrome://slow/ source. |
| 133 content::WebUIDataSource::Add(profile, CreateSlowUIHTMLSource()); | 133 content::WebUIDataSource::Add(profile, CreateSlowUIHTMLSource()); |
| 134 } | 134 } |
| 135 | 135 |
| 136 } // namespace chromeos | 136 } // namespace chromeos |
| 137 | 137 |
| OLD | NEW |