| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2012 Google Inc. All rights reserved. | 2 * Copyright (C) 2012 Google Inc. All rights reserved. |
| 3 * | 3 * |
| 4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
| 5 * modification, are permitted provided that the following conditions | 5 * modification, are permitted provided that the following conditions |
| 6 * are met: | 6 * are met: |
| 7 * 1. Redistributions of source code must retain the above copyright | 7 * 1. Redistributions of source code must retain the above copyright |
| 8 * notice, this list of conditions and the following disclaimer. | 8 * notice, this list of conditions and the following disclaimer. |
| 9 * 2. Redistributions in binary form must reproduce the above copyright | 9 * 2. Redistributions in binary form must reproduce the above copyright |
| 10 * notice, this list of conditions and the following disclaimer in the | 10 * notice, this list of conditions and the following disclaimer in the |
| (...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 46 #include "platform/wtf/PtrUtil.h" | 46 #include "platform/wtf/PtrUtil.h" |
| 47 #include "public/platform/Platform.h" | 47 #include "public/platform/Platform.h" |
| 48 #include "public/platform/WebCompositorSupport.h" | 48 #include "public/platform/WebCompositorSupport.h" |
| 49 #include "public/platform/WebLayer.h" | 49 #include "public/platform/WebLayer.h" |
| 50 #include "public/platform/WebLayerTreeView.h" | 50 #include "public/platform/WebLayerTreeView.h" |
| 51 #include "public/platform/WebThread.h" | 51 #include "public/platform/WebThread.h" |
| 52 #include "testing/gtest/include/gtest/gtest.h" | 52 #include "testing/gtest/include/gtest/gtest.h" |
| 53 | 53 |
| 54 namespace blink { | 54 namespace blink { |
| 55 | 55 |
| 56 class GraphicsLayerTest : public testing::Test { | 56 class GraphicsLayerTest : public ::testing::Test { |
| 57 public: | 57 public: |
| 58 GraphicsLayerTest() { | 58 GraphicsLayerTest() { |
| 59 clip_layer_ = WTF::WrapUnique(new FakeGraphicsLayer(&client_)); | 59 clip_layer_ = WTF::WrapUnique(new FakeGraphicsLayer(&client_)); |
| 60 scroll_elasticity_layer_ = WTF::WrapUnique(new FakeGraphicsLayer(&client_)); | 60 scroll_elasticity_layer_ = WTF::WrapUnique(new FakeGraphicsLayer(&client_)); |
| 61 page_scale_layer_ = WTF::WrapUnique(new FakeGraphicsLayer(&client_)); | 61 page_scale_layer_ = WTF::WrapUnique(new FakeGraphicsLayer(&client_)); |
| 62 graphics_layer_ = WTF::WrapUnique(new FakeGraphicsLayer(&client_)); | 62 graphics_layer_ = WTF::WrapUnique(new FakeGraphicsLayer(&client_)); |
| 63 clip_layer_->AddChild(scroll_elasticity_layer_.get()); | 63 clip_layer_->AddChild(scroll_elasticity_layer_.get()); |
| 64 scroll_elasticity_layer_->AddChild(page_scale_layer_.get()); | 64 scroll_elasticity_layer_->AddChild(page_scale_layer_.get()); |
| 65 page_scale_layer_->AddChild(graphics_layer_.get()); | 65 page_scale_layer_->AddChild(graphics_layer_.get()); |
| 66 graphics_layer_->PlatformLayer()->SetScrollable( | 66 graphics_layer_->PlatformLayer()->SetScrollable( |
| (...skipping 136 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 203 return Platform::Current()->CurrentThread()->Scheduler()->TimerTaskRunner(); | 203 return Platform::Current()->CurrentThread()->Scheduler()->TimerTaskRunner(); |
| 204 } | 204 } |
| 205 | 205 |
| 206 DEFINE_INLINE_VIRTUAL_TRACE() { ScrollableArea::Trace(visitor); } | 206 DEFINE_INLINE_VIRTUAL_TRACE() { ScrollableArea::Trace(visitor); } |
| 207 | 207 |
| 208 private: | 208 private: |
| 209 ScrollOffset scroll_offset_; | 209 ScrollOffset scroll_offset_; |
| 210 }; | 210 }; |
| 211 | 211 |
| 212 } // namespace blink | 212 } // namespace blink |
| OLD | NEW |