| 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 "content/browser/renderer_host/render_widget_host_impl.h" | 5 #include "content/browser/renderer_host/render_widget_host_impl.h" |
| 6 | 6 |
| 7 #include <math.h> | 7 #include <math.h> |
| 8 #include <set> | 8 #include <set> |
| 9 #include <utility> | 9 #include <utility> |
| 10 | 10 |
| (...skipping 659 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 670 HasSwitch(switches::kEnableImageColorProfiles); | 670 HasSwitch(switches::kEnableImageColorProfiles); |
| 671 if (!image_profiles) | 671 if (!image_profiles) |
| 672 return; | 672 return; |
| 673 #if defined(OS_WIN) | 673 #if defined(OS_WIN) |
| 674 // Windows will read disk to get the color profile data if needed, so | 674 // Windows will read disk to get the color profile data if needed, so |
| 675 // dispatch the SendColorProfile() work off the UI thread. | 675 // dispatch the SendColorProfile() work off the UI thread. |
| 676 BrowserThread::PostBlockingPoolTask( | 676 BrowserThread::PostBlockingPoolTask( |
| 677 FROM_HERE, | 677 FROM_HERE, |
| 678 base::Bind(&RenderWidgetHostImpl::SendColorProfile, | 678 base::Bind(&RenderWidgetHostImpl::SendColorProfile, |
| 679 weak_factory_.GetWeakPtr())); | 679 weak_factory_.GetWeakPtr())); |
| 680 #elif !defined(OS_CHROMEOS) && !defined(OS_IOS) && !defined(OS_ANDROID) | 680 #elif !defined(OS_CHROMEOS) && !defined(OS_ANDROID) |
| 681 // Only support desktop Mac and Linux at this time. | 681 // Only support desktop Mac and Linux at this time. |
| 682 SendColorProfile(); | 682 SendColorProfile(); |
| 683 #endif | 683 #endif |
| 684 #endif | 684 #endif |
| 685 } | 685 } |
| 686 | 686 |
| 687 void RenderWidgetHostImpl::SendColorProfile() { | 687 void RenderWidgetHostImpl::SendColorProfile() { |
| 688 if (!view_ || !delegate_) | 688 if (!view_ || !delegate_) |
| 689 return; | 689 return; |
| 690 DCHECK(!view_->GetRequestedRendererSize().IsEmpty()); | 690 DCHECK(!view_->GetRequestedRendererSize().IsEmpty()); |
| (...skipping 1551 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2242 } | 2242 } |
| 2243 | 2243 |
| 2244 #if defined(OS_WIN) | 2244 #if defined(OS_WIN) |
| 2245 gfx::NativeViewAccessible | 2245 gfx::NativeViewAccessible |
| 2246 RenderWidgetHostImpl::GetParentNativeViewAccessible() { | 2246 RenderWidgetHostImpl::GetParentNativeViewAccessible() { |
| 2247 return delegate_ ? delegate_->GetParentNativeViewAccessible() : NULL; | 2247 return delegate_ ? delegate_->GetParentNativeViewAccessible() : NULL; |
| 2248 } | 2248 } |
| 2249 #endif | 2249 #endif |
| 2250 | 2250 |
| 2251 } // namespace content | 2251 } // namespace content |
| OLD | NEW |