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 "base/bind.h" | 5 #include "base/bind.h" |
6 #include "base/memory/scoped_vector.h" | 6 #include "base/memory/scoped_vector.h" |
7 #include "mojo/application_manager/application_manager.h" | 7 #include "mojo/application_manager/application_manager.h" |
8 #include "mojo/public/cpp/application/application_delegate.h" | 8 #include "mojo/public/cpp/application/application_delegate.h" |
9 #include "mojo/public/cpp/application/application_impl.h" | 9 #include "mojo/public/cpp/application/application_impl.h" |
10 #include "mojo/public/cpp/application/service_provider_impl.h" | 10 #include "mojo/public/cpp/application/service_provider_impl.h" |
(...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
108 virtual void Load(ApplicationManager* application_manager, | 108 virtual void Load(ApplicationManager* application_manager, |
109 const GURL& url, | 109 const GURL& url, |
110 scoped_refptr<LoadCallbacks> callbacks) MOJO_OVERRIDE { | 110 scoped_refptr<LoadCallbacks> callbacks) MOJO_OVERRIDE { |
111 ScopedMessagePipeHandle shell_handle = callbacks->RegisterApplication(); | 111 ScopedMessagePipeHandle shell_handle = callbacks->RegisterApplication(); |
112 if (!shell_handle.is_valid()) | 112 if (!shell_handle.is_valid()) |
113 return; | 113 return; |
114 scoped_ptr<ApplicationImpl> app( | 114 scoped_ptr<ApplicationImpl> app( |
115 new ApplicationImpl(this, shell_handle.Pass())); | 115 new ApplicationImpl(this, shell_handle.Pass())); |
116 apps_.push_back(app.release()); | 116 apps_.push_back(app.release()); |
117 } | 117 } |
118 virtual void OnServiceError(ApplicationManager* application_manager, | 118 virtual void OnApplicationError(ApplicationManager* application_manager, |
119 const GURL& url) MOJO_OVERRIDE {} | 119 const GURL& url) MOJO_OVERRIDE {} |
120 | 120 |
121 // Overridden from ApplicationDelegate: | 121 // Overridden from ApplicationDelegate: |
122 virtual bool ConfigureIncomingConnection( | 122 virtual bool ConfigureIncomingConnection( |
123 ApplicationConnection* connection) MOJO_OVERRIDE { | 123 ApplicationConnection* connection) MOJO_OVERRIDE { |
124 connection->AddService(&view_manager_client_factory_); | 124 connection->AddService(&view_manager_client_factory_); |
125 return true; | 125 return true; |
126 } | 126 } |
127 | 127 |
128 // Overridden from ViewManagerDelegate: | 128 // Overridden from ViewManagerDelegate: |
129 virtual void OnEmbed( | 129 virtual void OnEmbed( |
(...skipping 144 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
274 | 274 |
275 Id second_window = OpenWindow(); | 275 Id second_window = OpenWindow(); |
276 window_manager_->ActivateWindow(second_window, | 276 window_manager_->ActivateWindow(second_window, |
277 base::Bind(&EmptyResultCallback)); | 277 base::Bind(&EmptyResultCallback)); |
278 ids = WaitForActiveWindowChange(); | 278 ids = WaitForActiveWindowChange(); |
279 EXPECT_EQ(ids.first, first_window); | 279 EXPECT_EQ(ids.first, first_window); |
280 EXPECT_EQ(ids.second, second_window); | 280 EXPECT_EQ(ids.second, second_window); |
281 } | 281 } |
282 | 282 |
283 } // namespace mojo | 283 } // namespace mojo |
OLD | NEW |