| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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/md_history_ui.h" | 5 #include "chrome/browser/ui/webui/md_history_ui.h" |
| 6 | 6 |
| 7 #include "base/bind.h" | 7 #include "base/bind.h" |
| 8 #include "base/bind_helpers.h" | 8 #include "base/bind_helpers.h" |
| 9 #include "base/command_line.h" | 9 #include "base/command_line.h" |
| 10 #include "build/build_config.h" | 10 #include "build/build_config.h" |
| (...skipping 157 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 168 source->AddResourcePath("history_toolbar.html", | 168 source->AddResourcePath("history_toolbar.html", |
| 169 IDR_MD_HISTORY_HISTORY_TOOLBAR_HTML); | 169 IDR_MD_HISTORY_HISTORY_TOOLBAR_HTML); |
| 170 source->AddResourcePath("history_toolbar.js", | 170 source->AddResourcePath("history_toolbar.js", |
| 171 IDR_MD_HISTORY_HISTORY_TOOLBAR_JS); | 171 IDR_MD_HISTORY_HISTORY_TOOLBAR_JS); |
| 172 source->AddResourcePath("icons.html", IDR_MD_HISTORY_ICONS_HTML); | 172 source->AddResourcePath("icons.html", IDR_MD_HISTORY_ICONS_HTML); |
| 173 source->AddResourcePath("lazy_load.html", IDR_MD_HISTORY_LAZY_LOAD_HTML); | 173 source->AddResourcePath("lazy_load.html", IDR_MD_HISTORY_LAZY_LOAD_HTML); |
| 174 source->AddResourcePath("list_container.html", | 174 source->AddResourcePath("list_container.html", |
| 175 IDR_MD_HISTORY_LIST_CONTAINER_HTML); | 175 IDR_MD_HISTORY_LIST_CONTAINER_HTML); |
| 176 source->AddResourcePath("list_container.js", | 176 source->AddResourcePath("list_container.js", |
| 177 IDR_MD_HISTORY_LIST_CONTAINER_JS); | 177 IDR_MD_HISTORY_LIST_CONTAINER_JS); |
| 178 source->AddResourcePath("router.html", |
| 179 IDR_MD_HISTORY_ROUTER_HTML); |
| 180 source->AddResourcePath("router.js", |
| 181 IDR_MD_HISTORY_ROUTER_JS); |
| 178 source->AddResourcePath("searched_label.html", | 182 source->AddResourcePath("searched_label.html", |
| 179 IDR_MD_HISTORY_SEARCHED_LABEL_HTML); | 183 IDR_MD_HISTORY_SEARCHED_LABEL_HTML); |
| 180 source->AddResourcePath("searched_label.js", | 184 source->AddResourcePath("searched_label.js", |
| 181 IDR_MD_HISTORY_SEARCHED_LABEL_JS); | 185 IDR_MD_HISTORY_SEARCHED_LABEL_JS); |
| 182 source->AddResourcePath("shared_style.html", | 186 source->AddResourcePath("shared_style.html", |
| 183 IDR_MD_HISTORY_SHARED_STYLE_HTML); | 187 IDR_MD_HISTORY_SHARED_STYLE_HTML); |
| 184 source->AddResourcePath("shared_vars.html", | 188 source->AddResourcePath("shared_vars.html", |
| 185 IDR_MD_HISTORY_SHARED_VARS_HTML); | 189 IDR_MD_HISTORY_SHARED_VARS_HTML); |
| 186 source->AddResourcePath("side_bar.html", IDR_MD_HISTORY_SIDE_BAR_HTML); | 190 source->AddResourcePath("side_bar.html", IDR_MD_HISTORY_SIDE_BAR_HTML); |
| 187 source->AddResourcePath("side_bar.js", IDR_MD_HISTORY_SIDE_BAR_JS); | 191 source->AddResourcePath("side_bar.js", IDR_MD_HISTORY_SIDE_BAR_JS); |
| (...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 252 user_prefs::PrefRegistrySyncable* registry) { | 256 user_prefs::PrefRegistrySyncable* registry) { |
| 253 registry->RegisterBooleanPref(prefs::kMdHistoryMenuPromoShown, false, | 257 registry->RegisterBooleanPref(prefs::kMdHistoryMenuPromoShown, false, |
| 254 user_prefs::PrefRegistrySyncable::SYNCABLE_PREF); | 258 user_prefs::PrefRegistrySyncable::SYNCABLE_PREF); |
| 255 } | 259 } |
| 256 | 260 |
| 257 void MdHistoryUI::HandleMenuPromoShown(const base::ListValue* args) { | 261 void MdHistoryUI::HandleMenuPromoShown(const base::ListValue* args) { |
| 258 Profile::FromWebUI(web_ui())->GetPrefs()->SetBoolean( | 262 Profile::FromWebUI(web_ui())->GetPrefs()->SetBoolean( |
| 259 prefs::kMdHistoryMenuPromoShown, true); | 263 prefs::kMdHistoryMenuPromoShown, true); |
| 260 data_source_->AddBoolean("showMenuPromo", false); | 264 data_source_->AddBoolean("showMenuPromo", false); |
| 261 } | 265 } |
| OLD | NEW |