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

Side by Side Diff: components/web_view/test_frame_tree_delegate.cc

Issue 1548203002: Convert Pass()→std::move() in //components/[n-z]* (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix bad headers Created 4 years, 12 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 "components/web_view/test_frame_tree_delegate.h" 5 #include "components/web_view/test_frame_tree_delegate.h"
6 6
7 #include <utility>
8
7 #include "base/run_loop.h" 9 #include "base/run_loop.h"
8 #include "components/web_view/client_initiated_frame_connection.h" 10 #include "components/web_view/client_initiated_frame_connection.h"
9 #include "components/web_view/frame_connection.h" 11 #include "components/web_view/frame_connection.h"
10 #include "testing/gtest/include/gtest/gtest.h" 12 #include "testing/gtest/include/gtest/gtest.h"
11 13
12 namespace web_view { 14 namespace web_view {
13 15
14 TestFrameTreeDelegate::TestFrameTreeDelegate(mojo::ApplicationImpl* app) 16 TestFrameTreeDelegate::TestFrameTreeDelegate(mojo::ApplicationImpl* app)
15 : app_(app), 17 : app_(app),
16 waiting_for_create_frame_(false), 18 waiting_for_create_frame_(false),
(...skipping 27 matching lines...) Expand all
44 ASSERT_FALSE(is_waiting()); 46 ASSERT_FALSE(is_waiting());
45 waiting_for_frame_disconnected_ = frame; 47 waiting_for_frame_disconnected_ = frame;
46 run_loop_.reset(new base::RunLoop); 48 run_loop_.reset(new base::RunLoop);
47 run_loop_->Run(); 49 run_loop_->Run();
48 run_loop_.reset(); 50 run_loop_.reset();
49 } 51 }
50 52
51 scoped_ptr<FrameUserData> TestFrameTreeDelegate::CreateUserDataForNewFrame( 53 scoped_ptr<FrameUserData> TestFrameTreeDelegate::CreateUserDataForNewFrame(
52 mojom::FrameClientPtr frame_client) { 54 mojom::FrameClientPtr frame_client) {
53 return make_scoped_ptr( 55 return make_scoped_ptr(
54 new ClientInitiatedFrameConnection(frame_client.Pass())); 56 new ClientInitiatedFrameConnection(std::move(frame_client)));
55 } 57 }
56 58
57 bool TestFrameTreeDelegate::CanPostMessageEventToFrame( 59 bool TestFrameTreeDelegate::CanPostMessageEventToFrame(
58 const Frame* source, 60 const Frame* source,
59 const Frame* target, 61 const Frame* target,
60 mojom::HTMLMessageEvent* event) { 62 mojom::HTMLMessageEvent* event) {
61 return true; 63 return true;
62 } 64 }
63 65
64 void TestFrameTreeDelegate::LoadingStateChanged(bool loading, double progress) { 66 void TestFrameTreeDelegate::LoadingStateChanged(bool loading, double progress) {
65 } 67 }
66 68
67 void TestFrameTreeDelegate::TitleChanged(const mojo::String& title) {} 69 void TestFrameTreeDelegate::TitleChanged(const mojo::String& title) {}
68 70
69 void TestFrameTreeDelegate::NavigateTopLevel(Frame* source, 71 void TestFrameTreeDelegate::NavigateTopLevel(Frame* source,
70 mojo::URLRequestPtr request) {} 72 mojo::URLRequestPtr request) {}
71 73
72 void TestFrameTreeDelegate::CanNavigateFrame( 74 void TestFrameTreeDelegate::CanNavigateFrame(
73 Frame* target, 75 Frame* target,
74 mojo::URLRequestPtr request, 76 mojo::URLRequestPtr request,
75 const CanNavigateFrameCallback& callback) { 77 const CanNavigateFrameCallback& callback) {
76 FrameConnection::CreateConnectionForCanNavigateFrame( 78 FrameConnection::CreateConnectionForCanNavigateFrame(
77 app_, target, request.Pass(), callback); 79 app_, target, std::move(request), callback);
78 } 80 }
79 81
80 void TestFrameTreeDelegate::DidStartNavigation(Frame* frame) {} 82 void TestFrameTreeDelegate::DidStartNavigation(Frame* frame) {}
81 83
82 void TestFrameTreeDelegate::DidCommitProvisionalLoad(Frame* frame) {} 84 void TestFrameTreeDelegate::DidCommitProvisionalLoad(Frame* frame) {}
83 85
84 void TestFrameTreeDelegate::DidNavigateLocally(Frame* source, 86 void TestFrameTreeDelegate::DidNavigateLocally(Frame* source,
85 const GURL& url) {} 87 const GURL& url) {}
86 88
87 void TestFrameTreeDelegate::DidCreateFrame(Frame* frame) { 89 void TestFrameTreeDelegate::DidCreateFrame(Frame* frame) {
(...skipping 11 matching lines...) Expand all
99 } 101 }
100 102
101 void TestFrameTreeDelegate::OnWindowEmbeddedInFrameDisconnected(Frame* frame) { 103 void TestFrameTreeDelegate::OnWindowEmbeddedInFrameDisconnected(Frame* frame) {
102 if (waiting_for_frame_disconnected_ == frame) { 104 if (waiting_for_frame_disconnected_ == frame) {
103 waiting_for_frame_disconnected_ = nullptr; 105 waiting_for_frame_disconnected_ = nullptr;
104 run_loop_->Quit(); 106 run_loop_->Quit();
105 } 107 }
106 } 108 }
107 109
108 } // namespace web_view 110 } // namespace web_view
OLDNEW
« no previous file with comments | « components/web_view/public/cpp/web_view.cc ('k') | components/web_view/test_runner/test_runner_application_delegate.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698