Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(681)

Side by Side Diff: content/renderer/render_frame_impl_browsertest.cc

Issue 2034153002: Makes RenderFrameObserver/RenderViewObserver::OnDestruct pure virtual. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Addressed comments. Created 4 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « content/renderer/push_messaging/push_messaging_dispatcher.cc ('k') | content/renderer/render_view_mouse_lock_dispatcher.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698