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/components_ui.h" | 5 #include "chrome/browser/ui/webui/components_ui.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 #include <string> | 8 #include <string> |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
11 #include "base/values.h" | 11 #include "base/values.h" |
12 #include "chrome/browser/browser_process.h" | 12 #include "chrome/browser/browser_process.h" |
13 #include "chrome/browser/ui/browser.h" | 13 #include "chrome/browser/ui/browser.h" |
14 #include "chrome/browser/ui/browser_window.h" | 14 #include "chrome/browser/ui/browser_window.h" |
15 #include "chrome/common/chrome_paths.h" | 15 #include "chrome/common/chrome_paths.h" |
16 #include "chrome/common/url_constants.h" | 16 #include "chrome/common/url_constants.h" |
| 17 #include "chrome/grit/generated_resources.h" |
17 #include "components/component_updater/component_updater_service.h" | 18 #include "components/component_updater/component_updater_service.h" |
18 #include "components/component_updater/crx_update_item.h" | 19 #include "components/component_updater/crx_update_item.h" |
19 #include "content/public/browser/web_ui.h" | 20 #include "content/public/browser/web_ui.h" |
20 #include "content/public/browser/web_ui_data_source.h" | 21 #include "content/public/browser/web_ui_data_source.h" |
21 #include "content/public/browser/web_ui_message_handler.h" | 22 #include "content/public/browser/web_ui_message_handler.h" |
22 #include "grit/browser_resources.h" | 23 #include "grit/browser_resources.h" |
23 #include "grit/generated_resources.h" | |
24 #include "grit/theme_resources.h" | 24 #include "grit/theme_resources.h" |
25 #include "ui/base/l10n/l10n_util.h" | 25 #include "ui/base/l10n/l10n_util.h" |
26 #include "ui/base/resource/resource_bundle.h" | 26 #include "ui/base/resource/resource_bundle.h" |
27 | 27 |
28 #if defined(OS_CHROMEOS) | 28 #if defined(OS_CHROMEOS) |
29 #include "chrome/browser/ui/webui/chromeos/ui_account_tweaks.h" | 29 #include "chrome/browser/ui/webui/chromeos/ui_account_tweaks.h" |
30 #endif | 30 #endif |
31 | 31 |
32 using content::WebUIMessageHandler; | 32 using content::WebUIMessageHandler; |
33 | 33 |
(...skipping 212 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
246 if (event == ComponentUpdateService::Observer::COMPONENT_UPDATED) { | 246 if (event == ComponentUpdateService::Observer::COMPONENT_UPDATED) { |
247 ComponentUpdateService* cus = g_browser_process->component_updater(); | 247 ComponentUpdateService* cus = g_browser_process->component_updater(); |
248 component_updater::CrxUpdateItem item; | 248 component_updater::CrxUpdateItem item; |
249 if (cus->GetComponentDetails(id, &item)) | 249 if (cus->GetComponentDetails(id, &item)) |
250 parameters.SetString("version", item.component.version.GetString()); | 250 parameters.SetString("version", item.component.version.GetString()); |
251 } | 251 } |
252 parameters.SetString("id", id); | 252 parameters.SetString("id", id); |
253 } | 253 } |
254 web_ui()->CallJavascriptFunction("onComponentEvent", parameters); | 254 web_ui()->CallJavascriptFunction("onComponentEvent", parameters); |
255 } | 255 } |
OLD | NEW |