OLD | NEW |
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 "mojo/services/public/cpp/view_manager/view_manager.h" | 5 #include "mojo/services/public/cpp/view_manager/view_manager.h" |
6 | 6 |
7 #include "base/auto_reset.h" | 7 #include "base/auto_reset.h" |
8 #include "base/bind.h" | 8 #include "base/bind.h" |
9 #include "base/logging.h" | 9 #include "base/logging.h" |
10 #include "mojo/application_manager/application_manager.h" | 10 #include "mojo/application_manager/application_manager.h" |
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
46 public ViewManagerDelegate { | 46 public ViewManagerDelegate { |
47 public: | 47 public: |
48 typedef base::Callback<void(ViewManager*, View*)> LoadedCallback; | 48 typedef base::Callback<void(ViewManager*, View*)> LoadedCallback; |
49 | 49 |
50 explicit ConnectApplicationLoader(const LoadedCallback& callback) | 50 explicit ConnectApplicationLoader(const LoadedCallback& callback) |
51 : callback_(callback) {} | 51 : callback_(callback) {} |
52 virtual ~ConnectApplicationLoader() {} | 52 virtual ~ConnectApplicationLoader() {} |
53 | 53 |
54 private: | 54 private: |
55 // Overridden from ApplicationDelegate: | 55 // Overridden from ApplicationDelegate: |
56 virtual void Initialize(ApplicationImpl* app) MOJO_OVERRIDE { | 56 virtual void Initialize(ApplicationImpl* app) override { |
57 view_manager_client_factory_.reset( | 57 view_manager_client_factory_.reset( |
58 new ViewManagerClientFactory(app->shell(), this)); | 58 new ViewManagerClientFactory(app->shell(), this)); |
59 } | 59 } |
60 | 60 |
61 // Overridden from ApplicationLoader: | 61 // Overridden from ApplicationLoader: |
62 virtual void Load(ApplicationManager* manager, | 62 virtual void Load(ApplicationManager* manager, |
63 const GURL& url, | 63 const GURL& url, |
64 scoped_refptr<LoadCallbacks> callbacks) OVERRIDE { | 64 scoped_refptr<LoadCallbacks> callbacks) OVERRIDE { |
65 ScopedMessagePipeHandle shell_handle = callbacks->RegisterApplication(); | 65 ScopedMessagePipeHandle shell_handle = callbacks->RegisterApplication(); |
66 if (!shell_handle.is_valid()) | 66 if (!shell_handle.is_valid()) |
(...skipping 460 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
527 | 527 |
528 // TODO(beng): tests for view event dispatcher. | 528 // TODO(beng): tests for view event dispatcher. |
529 // - verify that we see events for all views. | 529 // - verify that we see events for all views. |
530 | 530 |
531 // TODO(beng): tests for focus: | 531 // TODO(beng): tests for focus: |
532 // - focus between two views known to a connection | 532 // - focus between two views known to a connection |
533 // - focus between views unknown to one of the connections. | 533 // - focus between views unknown to one of the connections. |
534 // - focus between views unknown to either connection. | 534 // - focus between views unknown to either connection. |
535 | 535 |
536 } // namespace mojo | 536 } // namespace mojo |
OLD | NEW |