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" |
(...skipping 19 matching lines...) Expand all Loading... |
30 #include "content/public/browser/user_metrics.h" | 30 #include "content/public/browser/user_metrics.h" |
31 #include "content/public/browser/web_ui.h" | 31 #include "content/public/browser/web_ui.h" |
32 #include "content/public/browser/web_ui_data_source.h" | 32 #include "content/public/browser/web_ui_data_source.h" |
33 #include "content/public/browser/web_ui_message_handler.h" | 33 #include "content/public/browser/web_ui_message_handler.h" |
34 #include "content/public/common/webplugininfo.h" | 34 #include "content/public/common/webplugininfo.h" |
35 #include "grit/browser_resources.h" | 35 #include "grit/browser_resources.h" |
36 #include "grit/chromium_strings.h" | 36 #include "grit/chromium_strings.h" |
37 #include "grit/generated_resources.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 #include "ui/base/resource/resource_bundle.h" | |
41 | 40 |
42 #if defined(OS_WIN) | 41 #if defined(OS_WIN) |
43 #include "base/win/windows_version.h" | 42 #include "base/win/windows_version.h" |
44 #endif | 43 #endif |
45 | 44 |
46 using base::ASCIIToUTF16; | 45 using base::ASCIIToUTF16; |
47 using base::UserMetricsAction; | 46 using base::UserMetricsAction; |
48 using content::BrowserThread; | 47 using content::BrowserThread; |
49 using content::PluginService; | 48 using content::PluginService; |
50 using content::WebUIMessageHandler; | 49 using content::WebUIMessageHandler; |
(...skipping 334 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
385 | 384 |
386 NaClUI::NaClUI(content::WebUI* web_ui) : WebUIController(web_ui) { | 385 NaClUI::NaClUI(content::WebUI* web_ui) : WebUIController(web_ui) { |
387 content::RecordAction(UserMetricsAction("ViewAboutNaCl")); | 386 content::RecordAction(UserMetricsAction("ViewAboutNaCl")); |
388 | 387 |
389 web_ui->AddMessageHandler(new NaClDomHandler()); | 388 web_ui->AddMessageHandler(new NaClDomHandler()); |
390 | 389 |
391 // Set up the about:nacl source. | 390 // Set up the about:nacl source. |
392 Profile* profile = Profile::FromWebUI(web_ui); | 391 Profile* profile = Profile::FromWebUI(web_ui); |
393 content::WebUIDataSource::Add(profile, CreateNaClUIHTMLSource()); | 392 content::WebUIDataSource::Add(profile, CreateNaClUIHTMLSource()); |
394 } | 393 } |
OLD | NEW |