| 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_view_aura.h" | 5 #include "content/browser/renderer_host/render_widget_host_view_aura.h" |
| 6 | 6 |
| 7 #include "base/basictypes.h" | 7 #include "base/basictypes.h" |
| 8 #include "base/command_line.h" | 8 #include "base/command_line.h" |
| 9 #include "base/memory/shared_memory.h" | 9 #include "base/memory/shared_memory.h" |
| 10 #include "base/message_loop/message_loop.h" | 10 #include "base/message_loop/message_loop.h" |
| (...skipping 192 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 203 gfx::Rect(size_), size_, | 203 gfx::Rect(size_), size_, |
| 204 base::TimeDelta()); | 204 base::TimeDelta()); |
| 205 *callback = base::Bind(&FakeFrameSubscriber::CallbackMethod, callback_); | 205 *callback = base::Bind(&FakeFrameSubscriber::CallbackMethod, callback_); |
| 206 return true; | 206 return true; |
| 207 } | 207 } |
| 208 | 208 |
| 209 base::TimeTicks last_present_time() const { return last_present_time_; } | 209 base::TimeTicks last_present_time() const { return last_present_time_; } |
| 210 | 210 |
| 211 static void CallbackMethod(base::Callback<void(bool)> callback, | 211 static void CallbackMethod(base::Callback<void(bool)> callback, |
| 212 base::TimeTicks present_time, | 212 base::TimeTicks present_time, |
| 213 const gfx::Rect& region_in_frame, |
| 213 bool success) { | 214 bool success) { |
| 214 callback.Run(success); | 215 callback.Run(success); |
| 215 } | 216 } |
| 216 | 217 |
| 217 private: | 218 private: |
| 218 gfx::Size size_; | 219 gfx::Size size_; |
| 219 base::Callback<void(bool)> callback_; | 220 base::Callback<void(bool)> callback_; |
| 220 base::TimeTicks last_present_time_; | 221 base::TimeTicks last_present_time_; |
| 221 }; | 222 }; |
| 222 | 223 |
| (...skipping 3379 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3602 ViewMsg_SetSurfaceIdNamespace::Read(msg, ¶ms); | 3603 ViewMsg_SetSurfaceIdNamespace::Read(msg, ¶ms); |
| 3603 view_->InitAsChild(NULL); | 3604 view_->InitAsChild(NULL); |
| 3604 view_->Show(); | 3605 view_->Show(); |
| 3605 view_->SetSize(size); | 3606 view_->SetSize(size); |
| 3606 view_->OnSwapCompositorFrame(0, | 3607 view_->OnSwapCompositorFrame(0, |
| 3607 MakeDelegatedFrame(1.f, size, gfx::Rect(size))); | 3608 MakeDelegatedFrame(1.f, size, gfx::Rect(size))); |
| 3608 EXPECT_EQ(view_->GetSurfaceIdNamespace(), base::get<0>(params)); | 3609 EXPECT_EQ(view_->GetSurfaceIdNamespace(), base::get<0>(params)); |
| 3609 } | 3610 } |
| 3610 | 3611 |
| 3611 } // namespace content | 3612 } // namespace content |
| OLD | NEW |