OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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 <stdint.h> | 5 #include <stdint.h> |
6 | 6 |
7 #include "base/command_line.h" | 7 #include "base/command_line.h" |
8 #include "base/debug/leak_annotations.h" | 8 #include "base/debug/leak_annotations.h" |
9 #include "build/build_config.h" | 9 #include "build/build_config.h" |
10 #include "content/common/frame_messages.h" | 10 #include "content/common/frame_messages.h" |
(...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
101 FakeCompositorDependencies compositor_deps_; | 101 FakeCompositorDependencies compositor_deps_; |
102 }; | 102 }; |
103 | 103 |
104 class RenderFrameTestObserver : public RenderFrameObserver { | 104 class RenderFrameTestObserver : public RenderFrameObserver { |
105 public: | 105 public: |
106 explicit RenderFrameTestObserver(RenderFrame* render_frame) | 106 explicit RenderFrameTestObserver(RenderFrame* render_frame) |
107 : RenderFrameObserver(render_frame), visible_(false) {} | 107 : RenderFrameObserver(render_frame), visible_(false) {} |
108 | 108 |
109 ~RenderFrameTestObserver() override {} | 109 ~RenderFrameTestObserver() override {} |
110 | 110 |
| 111 // RenderFrameObserver implementation. |
111 void WasShown() override { visible_ = true; } | 112 void WasShown() override { visible_ = true; } |
112 void WasHidden() override { visible_ = false; } | 113 void WasHidden() override { visible_ = false; } |
| 114 void OnDestruct() override { delete this; } |
113 | 115 |
114 bool visible() { return visible_; } | 116 bool visible() { return visible_; } |
115 | 117 |
116 private: | 118 private: |
117 bool visible_; | 119 bool visible_; |
118 }; | 120 }; |
119 | 121 |
120 #if defined(OS_ANDROID) | 122 #if defined(OS_ANDROID) |
121 // See https://crbug.com/472717 | 123 // See https://crbug.com/472717 |
122 #define MAYBE_SubframeWidget DISABLED_SubframeWidget | 124 #define MAYBE_SubframeWidget DISABLED_SubframeWidget |
(...skipping 163 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
286 EXPECT_EQ(blink::WebEffectiveConnectionType::TypeUnknown, | 288 EXPECT_EQ(blink::WebEffectiveConnectionType::TypeUnknown, |
287 GetMainRenderFrame()->getEffectiveConnectionType()); | 289 GetMainRenderFrame()->getEffectiveConnectionType()); |
288 | 290 |
289 // The subframe would be deleted here after a cross-document navigation. | 291 // The subframe would be deleted here after a cross-document navigation. |
290 // It happens to be left around in this test because this does not simulate | 292 // It happens to be left around in this test because this does not simulate |
291 // the frame detach. | 293 // the frame detach. |
292 } | 294 } |
293 } | 295 } |
294 | 296 |
295 } // namespace | 297 } // namespace |
OLD | NEW |