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

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

Issue 423963004: First cut at "content handling" support in Mojo. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: more gn Created 6 years, 4 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/at_exit.h" 8 #include "base/at_exit.h"
9 #include "base/auto_reset.h" 9 #include "base/auto_reset.h"
10 #include "base/bind.h" 10 #include "base/bind.h"
(...skipping 362 matching lines...) Expand 10 before | Expand all | Expand 10 after
373 // Used with ViewManagerService::Embed(). Creates a 373 // Used with ViewManagerService::Embed(). Creates a
374 // TestViewManagerClientConnection, which creates and owns the ViewManagerProxy. 374 // TestViewManagerClientConnection, which creates and owns the ViewManagerProxy.
375 class EmbedServiceLoader : public ServiceLoader, 375 class EmbedServiceLoader : public ServiceLoader,
376 ApplicationDelegate, 376 ApplicationDelegate,
377 public InterfaceFactory<ViewManagerClient> { 377 public InterfaceFactory<ViewManagerClient> {
378 public: 378 public:
379 EmbedServiceLoader() {} 379 EmbedServiceLoader() {}
380 virtual ~EmbedServiceLoader() {} 380 virtual ~EmbedServiceLoader() {}
381 381
382 // ServiceLoader implementation: 382 // ServiceLoader implementation:
383 virtual void LoadService(ServiceManager* manager, 383 virtual void Load(ServiceManager* manager,
384 const GURL& url, 384 const GURL& url,
385 ScopedMessagePipeHandle shell_handle) OVERRIDE { 385 scoped_refptr<LoadCallbacks> callbacks) OVERRIDE {
386 ScopedMessagePipeHandle shell_handle = callbacks->RegisterApplication();
387 if (!shell_handle.is_valid())
388 return;
386 scoped_ptr<ApplicationImpl> app(new ApplicationImpl(this, 389 scoped_ptr<ApplicationImpl> app(new ApplicationImpl(this,
387 shell_handle.Pass())); 390 shell_handle.Pass()));
388 apps_.push_back(app.release()); 391 apps_.push_back(app.release());
389 } 392 }
390 virtual void OnServiceError(ServiceManager* manager, 393 virtual void OnServiceError(ServiceManager* manager,
391 const GURL& url) OVERRIDE { 394 const GURL& url) OVERRIDE {
392 } 395 }
393 396
394 // ApplicationDelegate implementation: 397 // ApplicationDelegate implementation:
395 virtual bool ConfigureIncomingConnection(ApplicationConnection* connection) 398 virtual bool ConfigureIncomingConnection(ApplicationConnection* connection)
(...skipping 1061 matching lines...) Expand 10 before | Expand all | Expand 10 after
1457 // that SetBounsdNodes/AddNode and the like don't result in messages to the 1460 // that SetBounsdNodes/AddNode and the like don't result in messages to the
1458 // originating connection. 1461 // originating connection.
1459 1462
1460 // TODO(beng): Add tests for focus: 1463 // TODO(beng): Add tests for focus:
1461 // - focus between two nodes known to a connection 1464 // - focus between two nodes known to a connection
1462 // - focus between nodes unknown to one of the connections. 1465 // - focus between nodes unknown to one of the connections.
1463 // - focus between nodes unknown to either connection. 1466 // - focus between nodes unknown to either connection.
1464 1467
1465 } // namespace service 1468 } // namespace service
1466 } // namespace mojo 1469 } // namespace mojo
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698