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

Side by Side Diff: mojo/services/window_manager/window_manager_api_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
« no previous file with comments | « mojo/services/view_manager/view_manager_unittest.cc ('k') | mojo/shell/context.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 "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/public/cpp/application/application_delegate.h" 7 #include "mojo/public/cpp/application/application_delegate.h"
8 #include "mojo/public/cpp/application/application_impl.h" 8 #include "mojo/public/cpp/application/application_impl.h"
9 #include "mojo/service_manager/service_manager.h" 9 #include "mojo/service_manager/service_manager.h"
10 #include "mojo/services/public/cpp/view_manager/node.h" 10 #include "mojo/services/public/cpp/view_manager/node.h"
(...skipping 110 matching lines...) Expand 10 before | Expand all | Expand 10 after
121 public: 121 public:
122 typedef base::Callback<void(Node*)> RootAddedCallback; 122 typedef base::Callback<void(Node*)> RootAddedCallback;
123 123
124 explicit TestServiceLoader(const RootAddedCallback& root_added_callback) 124 explicit TestServiceLoader(const RootAddedCallback& root_added_callback)
125 : root_added_callback_(root_added_callback), 125 : root_added_callback_(root_added_callback),
126 view_manager_client_factory_(this) {} 126 view_manager_client_factory_(this) {}
127 virtual ~TestServiceLoader() {} 127 virtual ~TestServiceLoader() {}
128 128
129 private: 129 private:
130 // Overridden from ServiceLoader: 130 // Overridden from ServiceLoader:
131 virtual void LoadService(ServiceManager* service_manager, 131 virtual void Load(ServiceManager* service_manager,
132 const GURL& url, 132 const GURL& url,
133 ScopedMessagePipeHandle shell_handle) MOJO_OVERRIDE { 133 scoped_refptr<LoadCallbacks> callbacks) MOJO_OVERRIDE {
134 ScopedMessagePipeHandle shell_handle = callbacks->RegisterApplication();
135 if (!shell_handle.is_valid())
136 return;
134 scoped_ptr<ApplicationImpl> app( 137 scoped_ptr<ApplicationImpl> app(
135 new ApplicationImpl(this, shell_handle.Pass())); 138 new ApplicationImpl(this, shell_handle.Pass()));
136 apps_.push_back(app.release()); 139 apps_.push_back(app.release());
137 } 140 }
138 virtual void OnServiceError(ServiceManager* service_manager, 141 virtual void OnServiceError(ServiceManager* service_manager,
139 const GURL& url) MOJO_OVERRIDE { 142 const GURL& url) MOJO_OVERRIDE {
140 } 143 }
141 144
142 // Overridden from ApplicationDelegate: 145 // Overridden from ApplicationDelegate:
143 virtual bool ConfigureIncomingConnection( 146 virtual bool ConfigureIncomingConnection(
(...skipping 149 matching lines...) Expand 10 before | Expand all | Expand 10 after
293 296
294 Id second_window = OpenWindow(window_manager_.get()); 297 Id second_window = OpenWindow(window_manager_.get());
295 window_manager_->ActivateWindow(second_window, 298 window_manager_->ActivateWindow(second_window,
296 base::Bind(&EmptyResultCallback)); 299 base::Bind(&EmptyResultCallback));
297 ids = WaitForActiveWindowChange(); 300 ids = WaitForActiveWindowChange();
298 EXPECT_EQ(ids.first, first_window); 301 EXPECT_EQ(ids.first, first_window);
299 EXPECT_EQ(ids.second, second_window); 302 EXPECT_EQ(ids.second, second_window);
300 } 303 }
301 304
302 } // namespace mojo 305 } // namespace mojo
OLDNEW
« no previous file with comments | « mojo/services/view_manager/view_manager_unittest.cc ('k') | mojo/shell/context.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698