| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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/nacl_ui.h" | 5 #include "chrome/browser/ui/webui/nacl_ui.h" |
| 6 | 6 |
| 7 #include <string> | 7 #include <string> |
| 8 #include <vector> | 8 #include <vector> |
| 9 | 9 |
| 10 #include "base/bind.h" | 10 #include "base/bind.h" |
| 11 #include "base/bind_helpers.h" | 11 #include "base/bind_helpers.h" |
| 12 #include "base/command_line.h" | 12 #include "base/command_line.h" |
| 13 #include "base/file_util.h" | 13 #include "base/file_util.h" |
| 14 #include "base/json/json_file_value_serializer.h" | 14 #include "base/json/json_file_value_serializer.h" |
| 15 #include "base/memory/weak_ptr.h" | 15 #include "base/memory/weak_ptr.h" |
| 16 #include "base/path_service.h" | 16 #include "base/path_service.h" |
| 17 #include "base/strings/string16.h" | 17 #include "base/strings/string16.h" |
| 18 #include "base/strings/string_number_conversions.h" | 18 #include "base/strings/string_number_conversions.h" |
| 19 #include "base/strings/utf_string_conversions.h" | 19 #include "base/strings/utf_string_conversions.h" |
| 20 #include "base/threading/sequenced_worker_pool.h" | 20 #include "base/threading/sequenced_worker_pool.h" |
| 21 #include "base/values.h" | 21 #include "base/values.h" |
| 22 #include "chrome/browser/plugins/plugin_prefs.h" | 22 #include "chrome/browser/plugins/plugin_prefs.h" |
| 23 #include "chrome/browser/profiles/profile.h" | 23 #include "chrome/browser/profiles/profile.h" |
| 24 #include "chrome/common/chrome_paths.h" | 24 #include "chrome/common/chrome_paths.h" |
| 25 #include "chrome/common/chrome_switches.h" | 25 #include "chrome/common/chrome_switches.h" |
| 26 #include "chrome/common/chrome_version_info.h" | 26 #include "chrome/common/chrome_version_info.h" |
| 27 #include "chrome/common/url_constants.h" | 27 #include "chrome/common/url_constants.h" |
| 28 #include "chrome/grit/chromium_strings.h" |
| 29 #include "chrome/grit/generated_resources.h" |
| 28 #include "content/public/browser/browser_thread.h" | 30 #include "content/public/browser/browser_thread.h" |
| 29 #include "content/public/browser/plugin_service.h" | 31 #include "content/public/browser/plugin_service.h" |
| 30 #include "content/public/browser/user_metrics.h" | 32 #include "content/public/browser/user_metrics.h" |
| 31 #include "content/public/browser/web_ui.h" | 33 #include "content/public/browser/web_ui.h" |
| 32 #include "content/public/browser/web_ui_data_source.h" | 34 #include "content/public/browser/web_ui_data_source.h" |
| 33 #include "content/public/browser/web_ui_message_handler.h" | 35 #include "content/public/browser/web_ui_message_handler.h" |
| 34 #include "content/public/common/webplugininfo.h" | 36 #include "content/public/common/webplugininfo.h" |
| 35 #include "grit/browser_resources.h" | 37 #include "grit/browser_resources.h" |
| 36 #include "grit/chromium_strings.h" | |
| 37 #include "grit/generated_resources.h" | |
| 38 #include "grit/theme_resources.h" | 38 #include "grit/theme_resources.h" |
| 39 #include "ui/base/l10n/l10n_util.h" | 39 #include "ui/base/l10n/l10n_util.h" |
| 40 | 40 |
| 41 #if defined(OS_WIN) | 41 #if defined(OS_WIN) |
| 42 #include "base/win/windows_version.h" | 42 #include "base/win/windows_version.h" |
| 43 #endif | 43 #endif |
| 44 | 44 |
| 45 using base::ASCIIToUTF16; | 45 using base::ASCIIToUTF16; |
| 46 using base::UserMetricsAction; | 46 using base::UserMetricsAction; |
| 47 using content::BrowserThread; | 47 using content::BrowserThread; |
| (...skipping 336 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 384 | 384 |
| 385 NaClUI::NaClUI(content::WebUI* web_ui) : WebUIController(web_ui) { | 385 NaClUI::NaClUI(content::WebUI* web_ui) : WebUIController(web_ui) { |
| 386 content::RecordAction(UserMetricsAction("ViewAboutNaCl")); | 386 content::RecordAction(UserMetricsAction("ViewAboutNaCl")); |
| 387 | 387 |
| 388 web_ui->AddMessageHandler(new NaClDomHandler()); | 388 web_ui->AddMessageHandler(new NaClDomHandler()); |
| 389 | 389 |
| 390 // Set up the about:nacl source. | 390 // Set up the about:nacl source. |
| 391 Profile* profile = Profile::FromWebUI(web_ui); | 391 Profile* profile = Profile::FromWebUI(web_ui); |
| 392 content::WebUIDataSource::Add(profile, CreateNaClUIHTMLSource()); | 392 content::WebUIDataSource::Add(profile, CreateNaClUIHTMLSource()); |
| 393 } | 393 } |
| OLD | NEW |