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

Side by Side Diff: content/renderer/dom_serializer_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
« no previous file with comments | « content/renderer/devtools/devtools_client.cc ('k') | content/renderer/idle_user_detector.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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 <stddef.h> 5 #include <stddef.h>
6 #include <stdint.h> 6 #include <stdint.h>
7 7
8 #include "base/bind.h" 8 #include "base/bind.h"
9 #include "base/command_line.h" 9 #include "base/command_line.h"
10 #include "base/compiler_specific.h" 10 #include "base/compiler_specific.h"
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after
68 LoadObserver(RenderView* render_view, const base::Closure& quit_closure) 68 LoadObserver(RenderView* render_view, const base::Closure& quit_closure)
69 : RenderViewObserver(render_view), 69 : RenderViewObserver(render_view),
70 quit_closure_(quit_closure) {} 70 quit_closure_(quit_closure) {}
71 71
72 void DidFinishLoad(blink::WebLocalFrame* frame) override { 72 void DidFinishLoad(blink::WebLocalFrame* frame) override {
73 if (frame == render_view()->GetWebView()->mainFrame()) 73 if (frame == render_view()->GetWebView()->mainFrame())
74 quit_closure_.Run(); 74 quit_closure_.Run();
75 } 75 }
76 76
77 private: 77 private:
78 // RenderViewObserver implementation.
79 void OnDestruct() override { delete this; }
80
78 base::Closure quit_closure_; 81 base::Closure quit_closure_;
79 }; 82 };
80 83
81 class DomSerializerTests : public ContentBrowserTest, 84 class DomSerializerTests : public ContentBrowserTest,
82 public WebFrameSerializerClient { 85 public WebFrameSerializerClient {
83 public: 86 public:
84 DomSerializerTests() : serialization_reported_end_of_data_(false) {} 87 DomSerializerTests() : serialization_reported_end_of_data_(false) {}
85 88
86 void SetUpCommandLine(base::CommandLine* command_line) override { 89 void SetUpCommandLine(base::CommandLine* command_line) override {
87 command_line->AppendSwitch(switches::kSingleProcess); 90 command_line->AppendSwitch(switches::kSingleProcess);
(...skipping 768 matching lines...) Expand 10 before | Expand all | Expand 10 after
856 NavigateToURL(shell(), file_url); 859 NavigateToURL(shell(), file_url);
857 860
858 PostTaskToInProcessRendererAndWait( 861 PostTaskToInProcessRendererAndWait(
859 base::Bind( 862 base::Bind(
860 &DomSerializerTests:: 863 &DomSerializerTests::
861 SubResourceForElementsInNonHTMLNamespaceOnRenderer, 864 SubResourceForElementsInNonHTMLNamespaceOnRenderer,
862 base::Unretained(this), file_url)); 865 base::Unretained(this), file_url));
863 } 866 }
864 867
865 } // namespace content 868 } // namespace content
OLDNEW
« no previous file with comments | « content/renderer/devtools/devtools_client.cc ('k') | content/renderer/idle_user_detector.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698