OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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/shell/renderer/test_runner/web_test_proxy.h" | 5 #include "content/shell/renderer/test_runner/web_test_proxy.h" |
6 | 6 |
7 #include <cctype> | 7 #include <cctype> |
8 | 8 |
9 #include "base/callback_helpers.h" | 9 #include "base/callback_helpers.h" |
10 #include "base/command_line.h" | 10 #include "base/command_line.h" |
(...skipping 559 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
570 : callback_(callback), wait_for_popup_(false) { | 570 : callback_(callback), wait_for_popup_(false) { |
571 } | 571 } |
572 | 572 |
573 CaptureCallback::~CaptureCallback() { | 573 CaptureCallback::~CaptureCallback() { |
574 } | 574 } |
575 | 575 |
576 void CaptureCallback::didCompositeAndReadback(const SkBitmap& bitmap) { | 576 void CaptureCallback::didCompositeAndReadback(const SkBitmap& bitmap) { |
577 TRACE_EVENT2("shell", | 577 TRACE_EVENT2("shell", |
578 "CaptureCallback::didCompositeAndReadback", | 578 "CaptureCallback::didCompositeAndReadback", |
579 "x", | 579 "x", |
580 bitmap.info().fWidth, | 580 bitmap.info().width(), |
581 "y", | 581 "y", |
582 bitmap.info().fHeight); | 582 bitmap.info().height()); |
583 if (!wait_for_popup_) { | 583 if (!wait_for_popup_) { |
584 callback_.Run(bitmap); | 584 callback_.Run(bitmap); |
585 delete this; | 585 delete this; |
586 return; | 586 return; |
587 } | 587 } |
588 if (main_bitmap_.isNull()) { | 588 if (main_bitmap_.isNull()) { |
589 bitmap.deepCopyTo(&main_bitmap_); | 589 bitmap.deepCopyTo(&main_bitmap_); |
590 return; | 590 return; |
591 } | 591 } |
592 SkCanvas canvas(main_bitmap_); | 592 SkCanvas canvas(main_bitmap_); |
(...skipping 797 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1390 // to cancel the input method's ongoing composition session. | 1390 // to cancel the input method's ongoing composition session. |
1391 if (web_widget_) | 1391 if (web_widget_) |
1392 web_widget_->confirmComposition(); | 1392 web_widget_->confirmComposition(); |
1393 } | 1393 } |
1394 | 1394 |
1395 blink::WebString WebTestProxyBase::acceptLanguages() { | 1395 blink::WebString WebTestProxyBase::acceptLanguages() { |
1396 return blink::WebString::fromUTF8(accept_languages_); | 1396 return blink::WebString::fromUTF8(accept_languages_); |
1397 } | 1397 } |
1398 | 1398 |
1399 } // namespace content | 1399 } // namespace content |
OLD | NEW |