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 287 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
298 find_compositor_frame_sink_callback_( | 298 find_compositor_frame_sink_callback_( |
299 std::move(find_compositor_frame_sink_callback)) {} | 299 std::move(find_compositor_frame_sink_callback)) {} |
300 | 300 |
301 // cc::SwapPromise implementation. | 301 // cc::SwapPromise implementation. |
302 void OnCommit() override { | 302 void OnCommit() override { |
303 compositor_frame_sink_from_commit_ = | 303 compositor_frame_sink_from_commit_ = |
304 find_compositor_frame_sink_callback_.Run(); | 304 find_compositor_frame_sink_callback_.Run(); |
305 DCHECK(compositor_frame_sink_from_commit_); | 305 DCHECK(compositor_frame_sink_from_commit_); |
306 } | 306 } |
307 void DidActivate() override {} | 307 void DidActivate() override {} |
308 void DidSwap(cc::CompositorFrameMetadata*) override { | 308 void WillSwap(cc::CompositorFrameMetadata*) override { |
309 compositor_frame_sink_from_commit_->RequestCopyOfOutput( | 309 compositor_frame_sink_from_commit_->RequestCopyOfOutput( |
310 std::move(copy_request_)); | 310 std::move(copy_request_)); |
311 } | 311 } |
| 312 void DidSwap() override {} |
312 DidNotSwapAction DidNotSwap(DidNotSwapReason r) override { | 313 DidNotSwapAction DidNotSwap(DidNotSwapReason r) override { |
313 // The compositor should always swap in layout test mode. | 314 // The compositor should always swap in layout test mode. |
314 NOTREACHED() << "did not swap for reason " << r; | 315 NOTREACHED() << "did not swap for reason " << r; |
315 return DidNotSwapAction::BREAK_PROMISE; | 316 return DidNotSwapAction::BREAK_PROMISE; |
316 } | 317 } |
317 int64_t TraceId() const override { return 0; } | 318 int64_t TraceId() const override { return 0; } |
318 | 319 |
319 private: | 320 private: |
320 std::unique_ptr<cc::CopyOutputRequest> copy_request_; | 321 std::unique_ptr<cc::CopyOutputRequest> copy_request_; |
321 FindCompositorFrameSinkCallback find_compositor_frame_sink_callback_; | 322 FindCompositorFrameSinkCallback find_compositor_frame_sink_callback_; |
(...skipping 812 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1134 | 1135 |
1135 void ForceTextInputStateUpdateForRenderFrame(RenderFrame* frame) { | 1136 void ForceTextInputStateUpdateForRenderFrame(RenderFrame* frame) { |
1136 if (auto* render_widget = | 1137 if (auto* render_widget = |
1137 static_cast<RenderFrameImpl*>(frame)->GetRenderWidget()) { | 1138 static_cast<RenderFrameImpl*>(frame)->GetRenderWidget()) { |
1138 render_widget->UpdateTextInputState(ShowIme::IF_NEEDED, | 1139 render_widget->UpdateTextInputState(ShowIme::IF_NEEDED, |
1139 ChangeSource::FROM_NON_IME); | 1140 ChangeSource::FROM_NON_IME); |
1140 } | 1141 } |
1141 } | 1142 } |
1142 | 1143 |
1143 } // namespace content | 1144 } // namespace content |
OLD | NEW |