| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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/options/chromeos/about_page_handler.h" | 5 #include "chrome/browser/ui/webui/options/chromeos/about_page_handler.h" |
| 6 | 6 |
| 7 #include <vector> | 7 #include <vector> |
| 8 | 8 |
| 9 #include "base/basictypes.h" | 9 #include "base/basictypes.h" |
| 10 #include "base/callback.h" | 10 #include "base/callback.h" |
| (...skipping 13 matching lines...) Expand all Loading... |
| 24 #include "chrome/browser/google/google_util.h" | 24 #include "chrome/browser/google/google_util.h" |
| 25 #include "chrome/common/chrome_version_info.h" | 25 #include "chrome/common/chrome_version_info.h" |
| 26 #include "chrome/common/url_constants.h" | 26 #include "chrome/common/url_constants.h" |
| 27 #include "googleurl/src/gurl.h" | 27 #include "googleurl/src/gurl.h" |
| 28 #include "grit/chromium_strings.h" | 28 #include "grit/chromium_strings.h" |
| 29 #include "grit/generated_resources.h" | 29 #include "grit/generated_resources.h" |
| 30 #include "grit/locale_settings.h" | 30 #include "grit/locale_settings.h" |
| 31 #include "grit/theme_resources.h" | 31 #include "grit/theme_resources.h" |
| 32 #include "ui/base/l10n/l10n_util.h" | 32 #include "ui/base/l10n/l10n_util.h" |
| 33 #include "ui/base/resource/resource_bundle.h" | 33 #include "ui/base/resource/resource_bundle.h" |
| 34 #include "v8/include/v8.h" |
| 34 #include "webkit/glue/user_agent.h" | 35 #include "webkit/glue/user_agent.h" |
| 35 #include "webkit/glue/webkit_glue.h" | 36 #include "webkit/glue/webkit_glue.h" |
| 36 | 37 |
| 37 #if defined(CHROME_V8) | |
| 38 #include "v8/include/v8.h" | |
| 39 #endif | |
| 40 | |
| 41 namespace { | 38 namespace { |
| 42 | 39 |
| 43 // These are used as placeholder text around the links in the text in the | 40 // These are used as placeholder text around the links in the text in the |
| 44 // license. | 41 // license. |
| 45 const char kBeginLink[] = "BEGIN_LINK"; | 42 const char kBeginLink[] = "BEGIN_LINK"; |
| 46 const char kEndLink[] = "END_LINK"; | 43 const char kEndLink[] = "END_LINK"; |
| 47 const char kBeginLinkChr[] = "BEGIN_LINK_CHR"; | 44 const char kBeginLinkChr[] = "BEGIN_LINK_CHR"; |
| 48 const char kBeginLinkOss[] = "BEGIN_LINK_OSS"; | 45 const char kBeginLinkOss[] = "BEGIN_LINK_OSS"; |
| 49 const char kEndLinkChr[] = "END_LINK_CHR"; | 46 const char kEndLinkChr[] = "END_LINK_CHR"; |
| 50 const char kEndLinkOss[] = "END_LINK_OSS"; | 47 const char kEndLinkOss[] = "END_LINK_OSS"; |
| (...skipping 152 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 203 localized_strings->SetString("cros_license_link_0", | 200 localized_strings->SetString("cros_license_link_0", |
| 204 chrome::kChromeUIOSCreditsURL); | 201 chrome::kChromeUIOSCreditsURL); |
| 205 | 202 |
| 206 // webkit | 203 // webkit |
| 207 | 204 |
| 208 localized_strings->SetString("webkit_version", | 205 localized_strings->SetString("webkit_version", |
| 209 webkit_glue::GetWebKitVersion()); | 206 webkit_glue::GetWebKitVersion()); |
| 210 | 207 |
| 211 // javascript | 208 // javascript |
| 212 | 209 |
| 213 #if defined(CHROME_V8) | |
| 214 localized_strings->SetString("js_engine", "V8"); | 210 localized_strings->SetString("js_engine", "V8"); |
| 215 localized_strings->SetString("js_engine_version", v8::V8::GetVersion()); | 211 localized_strings->SetString("js_engine_version", v8::V8::GetVersion()); |
| 216 #else | |
| 217 localized_strings->SetString("js_engine", "JavaScriptCore"); | |
| 218 localized_strings->SetString("js_engine_version", | |
| 219 webkit_glue::GetWebKitVersion()); | |
| 220 #endif | |
| 221 | 212 |
| 222 // user agent | 213 // user agent |
| 223 | 214 |
| 224 localized_strings->SetString("user_agent_info", | 215 localized_strings->SetString("user_agent_info", |
| 225 webkit_glue::GetUserAgent(GURL())); | 216 webkit_glue::GetUserAgent(GURL())); |
| 226 | 217 |
| 227 // command line | 218 // command line |
| 228 | 219 |
| 229 #if defined(OS_WIN) | 220 #if defined(OS_WIN) |
| 230 localized_strings->SetString("command_line_info", | 221 localized_strings->SetString("command_line_info", |
| (...skipping 190 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 421 if (CrosLibrary::Get()->GetUpdateLibrary()->HasObserver(observer)) { | 412 if (CrosLibrary::Get()->GetUpdateLibrary()->HasObserver(observer)) { |
| 422 // If UpdateLibrary still has the observer, then the page handler is valid. | 413 // If UpdateLibrary still has the observer, then the page handler is valid. |
| 423 AboutPageHandler* handler = observer->page_handler(); | 414 AboutPageHandler* handler = observer->page_handler(); |
| 424 scoped_ptr<Value> channel_string(Value::CreateStringValue(channel)); | 415 scoped_ptr<Value> channel_string(Value::CreateStringValue(channel)); |
| 425 handler->web_ui_->CallJavascriptFunction( | 416 handler->web_ui_->CallJavascriptFunction( |
| 426 "AboutPage.updateSelectedOptionCallback", *channel_string); | 417 "AboutPage.updateSelectedOptionCallback", *channel_string); |
| 427 } | 418 } |
| 428 } | 419 } |
| 429 | 420 |
| 430 } // namespace chromeos | 421 } // namespace chromeos |
| OLD | NEW |