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

Side by Side Diff: chrome/browser/media/router/mojo/media_router_mojo_test.h

Issue 2949933002: [Media Router] Factor extension-related logic out of MediaRouterMojoImpl (Closed)
Patch Set: Address Derek's comments Created 3 years, 5 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
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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 #ifndef CHROME_BROWSER_MEDIA_ROUTER_MOJO_MEDIA_ROUTER_MOJO_TEST_H_ 5 #ifndef CHROME_BROWSER_MEDIA_ROUTER_MOJO_MEDIA_ROUTER_MOJO_TEST_H_
6 #define CHROME_BROWSER_MEDIA_ROUTER_MOJO_MEDIA_ROUTER_MOJO_TEST_H_ 6 #define CHROME_BROWSER_MEDIA_ROUTER_MOJO_MEDIA_ROUTER_MOJO_TEST_H_
7 7
8 #include <memory>
8 #include <string> 9 #include <string>
10 #include <vector>
imcheng 2017/07/05 19:07:54 <vector> not needed? Since we aren't using vector
takumif 2017/07/06 17:15:33 Done.
9 11
10 #include "base/macros.h" 12 #include "base/macros.h"
11 #include "base/memory/ref_counted.h" 13 #include "base/memory/ref_counted.h"
12 #include "chrome/browser/media/router/mock_media_router.h" 14 #include "chrome/browser/media/router/mock_media_router.h"
13 #include "chrome/browser/media/router/mojo/media_router_mojo_impl.h" 15 #include "chrome/browser/media/router/mojo/media_router_mojo_impl.h"
14 #include "chrome/browser/media/router/test_helper.h" 16 #include "chrome/browser/media/router/test_helper.h"
15 #include "chrome/common/media_router/mojo/media_router.mojom.h" 17 #include "chrome/common/media_router/mojo/media_router.mojom.h"
16 #include "chrome/test/base/testing_profile.h" 18 #include "chrome/test/base/testing_profile.h"
17 #include "content/public/test/test_browser_thread_bundle.h" 19 #include "content/public/test/test_browser_thread_bundle.h"
18 #include "extensions/browser/event_page_tracker.h" 20 #include "extensions/browser/event_page_tracker.h"
(...skipping 224 matching lines...) Expand 10 before | Expand all | Expand 10 after
243 void TearDown() override; 245 void TearDown() override;
244 246
245 void ProcessEventLoop(); 247 void ProcessEventLoop();
246 248
247 void ConnectProviderManagerService(); 249 void ConnectProviderManagerService();
248 250
249 const std::string& extension_id() const { return extension_->id(); } 251 const std::string& extension_id() const { return extension_->id(); }
250 252
251 MediaRouterMojoImpl* router() const { return mock_media_router_.get(); } 253 MediaRouterMojoImpl* router() const { return mock_media_router_.get(); }
252 254
255 Profile* profile() { return &profile_; }
256
253 // Mock objects. 257 // Mock objects.
254 MockMediaRouteProvider mock_media_route_provider_; 258 MockMediaRouteProvider mock_media_route_provider_;
255 testing::NiceMock<MockEventPageTracker> mock_event_page_tracker_;
256 259
257 // Mojo proxy object for |mock_media_router_| 260 // Mojo proxy object for |mock_media_router_|
258 media_router::mojom::MediaRouterPtr media_router_proxy_; 261 media_router::mojom::MediaRouterPtr media_router_proxy_;
259 262
260 RegisterMediaRouteProviderHandler provide_handler_; 263 RegisterMediaRouteProviderHandler provide_handler_;
261 264
262 private: 265 private:
263 content::TestBrowserThreadBundle test_thread_bundle_; 266 content::TestBrowserThreadBundle test_thread_bundle_;
264 scoped_refptr<extensions::Extension> extension_; 267 scoped_refptr<extensions::Extension> extension_;
265 TestingProfile profile_; 268 TestingProfile profile_;
266 std::unique_ptr<MediaRouterMojoImpl> mock_media_router_; 269 std::unique_ptr<MediaRouterMojoImpl> mock_media_router_;
267 std::unique_ptr<mojo::Binding<mojom::MediaRouteProvider>> binding_; 270 std::unique_ptr<mojo::Binding<mojom::MediaRouteProvider>> binding_;
268 271
269 DISALLOW_COPY_AND_ASSIGN(MediaRouterMojoTest); 272 DISALLOW_COPY_AND_ASSIGN(MediaRouterMojoTest);
270 }; 273 };
271 274
272 } // namespace media_router 275 } // namespace media_router
273 276
274 #endif // CHROME_BROWSER_MEDIA_ROUTER_MOJO_MEDIA_ROUTER_MOJO_TEST_H_ 277 #endif // CHROME_BROWSER_MEDIA_ROUTER_MOJO_MEDIA_ROUTER_MOJO_TEST_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698