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/public/test/layouttest_support.h" | 5 #include "content/public/test/layouttest_support.h" |
6 | 6 |
7 #include <stddef.h> | 7 #include <stddef.h> |
8 #include <utility> | 8 #include <utility> |
9 | 9 |
10 #include "base/callback.h" | 10 #include "base/callback.h" |
(...skipping 479 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
490 | 490 |
491 gfx::ICCProfile GetTestingICCProfile(const std::string& name) { | 491 gfx::ICCProfile GetTestingICCProfile(const std::string& name) { |
492 if (name == "genericRGB") { | 492 if (name == "genericRGB") { |
493 return gfx::ICCProfileForTestingGenericRGB(); | 493 return gfx::ICCProfileForTestingGenericRGB(); |
494 } else if (name == "sRGB") { | 494 } else if (name == "sRGB") { |
495 return gfx::ICCProfileForTestingSRGB(); | 495 return gfx::ICCProfileForTestingSRGB(); |
496 } else if (name == "test" || name == "colorSpin") { | 496 } else if (name == "test" || name == "colorSpin") { |
497 return gfx::ICCProfileForTestingColorSpin(); | 497 return gfx::ICCProfileForTestingColorSpin(); |
498 } else if (name == "adobeRGB") { | 498 } else if (name == "adobeRGB") { |
499 return gfx::ICCProfileForTestingAdobeRGB(); | 499 return gfx::ICCProfileForTestingAdobeRGB(); |
| 500 } else if (name == "reset") { |
| 501 return gfx::ICCProfileForLayoutTests(); |
500 } | 502 } |
501 return gfx::ICCProfile(); | 503 return gfx::ICCProfile(); |
502 } | 504 } |
503 | 505 |
504 void SetDeviceColorProfile( | 506 void SetDeviceColorProfile( |
505 RenderView* render_view, const gfx::ICCProfile& icc_profile) { | 507 RenderView* render_view, const gfx::ICCProfile& icc_profile) { |
506 static_cast<RenderViewImpl*>(render_view)-> | 508 static_cast<RenderViewImpl*>(render_view)-> |
507 SetDeviceColorProfileForTesting(icc_profile); | 509 SetDeviceColorProfileForTesting(icc_profile); |
508 } | 510 } |
509 | 511 |
(...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
598 } | 600 } |
599 } | 601 } |
600 | 602 |
601 bool IsNavigationInitiatedByRenderer(const blink::WebURLRequest& request) { | 603 bool IsNavigationInitiatedByRenderer(const blink::WebURLRequest& request) { |
602 RequestExtraData* extra_data = | 604 RequestExtraData* extra_data = |
603 static_cast<RequestExtraData*>(request.GetExtraData()); | 605 static_cast<RequestExtraData*>(request.GetExtraData()); |
604 return extra_data && extra_data->navigation_initiated_by_renderer(); | 606 return extra_data && extra_data->navigation_initiated_by_renderer(); |
605 } | 607 } |
606 | 608 |
607 } // namespace content | 609 } // namespace content |
OLD | NEW |