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/renderer/chrome_content_renderer_client.h" | 5 #include "chrome/renderer/chrome_content_renderer_client.h" |
6 | 6 |
7 #include "base/command_line.h" | 7 #include "base/command_line.h" |
8 #include "base/debug/crash_logging.h" | 8 #include "base/debug/crash_logging.h" |
9 #include "base/logging.h" | 9 #include "base/logging.h" |
10 #include "base/metrics/field_trial.h" | 10 #include "base/metrics/field_trial.h" |
(...skipping 519 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
530 SkBitmap* ChromeContentRendererClient::GetSadPluginBitmap() { | 530 SkBitmap* ChromeContentRendererClient::GetSadPluginBitmap() { |
531 return const_cast<SkBitmap*>(ResourceBundle::GetSharedInstance(). | 531 return const_cast<SkBitmap*>(ResourceBundle::GetSharedInstance(). |
532 GetImageNamed(IDR_SAD_PLUGIN).ToSkBitmap()); | 532 GetImageNamed(IDR_SAD_PLUGIN).ToSkBitmap()); |
533 } | 533 } |
534 | 534 |
535 SkBitmap* ChromeContentRendererClient::GetSadWebViewBitmap() { | 535 SkBitmap* ChromeContentRendererClient::GetSadWebViewBitmap() { |
536 return const_cast<SkBitmap*>(ResourceBundle::GetSharedInstance(). | 536 return const_cast<SkBitmap*>(ResourceBundle::GetSharedInstance(). |
537 GetImageNamed(IDR_SAD_WEBVIEW).ToSkBitmap()); | 537 GetImageNamed(IDR_SAD_WEBVIEW).ToSkBitmap()); |
538 } | 538 } |
539 | 539 |
540 std::string ChromeContentRendererClient::GetDefaultEncoding() { | |
541 return l10n_util::GetStringUTF8(IDS_DEFAULT_ENCODING); | |
542 } | |
543 | |
544 #if defined(ENABLE_EXTENSIONS) | 540 #if defined(ENABLE_EXTENSIONS) |
545 const Extension* ChromeContentRendererClient::GetExtensionByOrigin( | 541 const Extension* ChromeContentRendererClient::GetExtensionByOrigin( |
546 const WebSecurityOrigin& origin) const { | 542 const WebSecurityOrigin& origin) const { |
547 if (!EqualsASCII(origin.protocol(), extensions::kExtensionScheme)) | 543 if (!EqualsASCII(origin.protocol(), extensions::kExtensionScheme)) |
548 return NULL; | 544 return NULL; |
549 | 545 |
550 const std::string extension_id = origin.host().utf8().data(); | 546 const std::string extension_id = origin.host().utf8().data(); |
551 return extension_dispatcher_->extensions()->GetByID(extension_id); | 547 return extension_dispatcher_->extensions()->GetByID(extension_id); |
552 } | 548 } |
553 #endif | 549 #endif |
(...skipping 1016 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1570 content::BrowserPluginDelegate* | 1566 content::BrowserPluginDelegate* |
1571 ChromeContentRendererClient::CreateBrowserPluginDelegate( | 1567 ChromeContentRendererClient::CreateBrowserPluginDelegate( |
1572 content::RenderFrame* render_frame, | 1568 content::RenderFrame* render_frame, |
1573 const std::string& mime_type) { | 1569 const std::string& mime_type) { |
1574 #if defined(ENABLE_EXTENSIONS) | 1570 #if defined(ENABLE_EXTENSIONS) |
1575 return new extensions::GuestViewContainer(render_frame, mime_type); | 1571 return new extensions::GuestViewContainer(render_frame, mime_type); |
1576 #else | 1572 #else |
1577 return NULL; | 1573 return NULL; |
1578 #endif | 1574 #endif |
1579 } | 1575 } |
OLD | NEW |