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

Side by Side Diff: mojo/services/view_manager/view_manager_connection_unittest.cc

Issue 300863003: Wire input events through the ViewManagerClient interface. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 6 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 | Annotate | Revision Log
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 <string> 5 #include <string>
6 #include <vector> 6 #include <vector>
7 7
8 #include "base/bind.h" 8 #include "base/bind.h"
9 #include "base/memory/scoped_ptr.h" 9 #include "base/memory/scoped_ptr.h"
10 #include "base/message_loop/message_loop.h" 10 #include "base/message_loop/message_loop.h"
(...skipping 328 matching lines...) Expand 10 before | Expand all | Expand 10 after
339 TransportViewId new_view_id, 339 TransportViewId new_view_id,
340 TransportViewId old_view_id) OVERRIDE { 340 TransportViewId old_view_id) OVERRIDE {
341 changes_.push_back( 341 changes_.push_back(
342 base::StringPrintf( 342 base::StringPrintf(
343 "ViewReplaced node=%s new_view=%s old_view=%s", 343 "ViewReplaced node=%s new_view=%s old_view=%s",
344 NodeIdToString(node).c_str(), 344 NodeIdToString(node).c_str(),
345 NodeIdToString(new_view_id).c_str(), 345 NodeIdToString(new_view_id).c_str(),
346 NodeIdToString(old_view_id).c_str())); 346 NodeIdToString(old_view_id).c_str()));
347 QuitIfNecessary(); 347 QuitIfNecessary();
348 } 348 }
349 virtual void OnViewInputEvent(uint32_t view,
350 const Event& event,
351 const Callback<void()>& callback) OVERRIDE {
352 }
349 353
350 void QuitIfNecessary() { 354 void QuitIfNecessary() {
351 if (quit_count_ > 0 && --quit_count_ == 0) 355 if (quit_count_ > 0 && --quit_count_ == 0)
352 current_run_loop->Quit(); 356 current_run_loop->Quit();
353 } 357 }
354 358
355 TransportConnectionId id_; 359 TransportConnectionId id_;
356 TransportChangeId next_server_change_id_; 360 TransportChangeId next_server_change_id_;
357 361
358 // Used to determine when/if to quit the run loop. 362 // Used to determine when/if to quit the run loop.
(...skipping 1084 matching lines...) Expand 10 before | Expand all | Expand 10 after
1443 ASSERT_EQ(1u, nodes.size()); 1447 ASSERT_EQ(1u, nodes.size());
1444 EXPECT_EQ("node=1,1 parent=null view=null", nodes[0].ToString()); 1448 EXPECT_EQ("node=1,1 parent=null view=null", nodes[0].ToString());
1445 } 1449 }
1446 1450
1447 // TODO(sky): add coverage of test that destroys connections and ensures other 1451 // TODO(sky): add coverage of test that destroys connections and ensures other
1448 // connections get deletion notification (or advanced server id). 1452 // connections get deletion notification (or advanced server id).
1449 1453
1450 } // namespace service 1454 } // namespace service
1451 } // namespace view_manager 1455 } // namespace view_manager
1452 } // namespace mojo 1456 } // namespace mojo
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698