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

Side by Side Diff: chrome/browser/media/router/media_router_mojo_impl.h

Issue 1821823002: [Media Router] Conditionally enable mDNS on Windows. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fixed compile and build dependency issues Created 4 years, 9 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_MEDIA_ROUTER_MOJO_IMPL_H_ 5 #ifndef CHROME_BROWSER_MEDIA_ROUTER_MEDIA_ROUTER_MOJO_IMPL_H_
6 #define CHROME_BROWSER_MEDIA_ROUTER_MEDIA_ROUTER_MOJO_IMPL_H_ 6 #define CHROME_BROWSER_MEDIA_ROUTER_MEDIA_ROUTER_MOJO_IMPL_H_
7 7
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include <deque> 10 #include <deque>
(...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after
91 void DetachRoute(const MediaRoute::Id& route_id) override; 91 void DetachRoute(const MediaRoute::Id& route_id) override;
92 void SendRouteMessage(const MediaRoute::Id& route_id, 92 void SendRouteMessage(const MediaRoute::Id& route_id,
93 const std::string& message, 93 const std::string& message,
94 const SendRouteMessageCallback& callback) override; 94 const SendRouteMessageCallback& callback) override;
95 void SendRouteBinaryMessage( 95 void SendRouteBinaryMessage(
96 const MediaRoute::Id& route_id, 96 const MediaRoute::Id& route_id,
97 scoped_ptr<std::vector<uint8_t>> data, 97 scoped_ptr<std::vector<uint8_t>> data,
98 const SendRouteMessageCallback& callback) override; 98 const SendRouteMessageCallback& callback) override;
99 void AddIssue(const Issue& issue) override; 99 void AddIssue(const Issue& issue) override;
100 void ClearIssue(const Issue::Id& issue_id) override; 100 void ClearIssue(const Issue::Id& issue_id) override;
101 bool should_enable_mdns_discovery() const override;
102 void EnableMdnsDiscovery() override;
101 103
102 const std::string& media_route_provider_extension_id() const { 104 const std::string& media_route_provider_extension_id() const {
103 return media_route_provider_extension_id_; 105 return media_route_provider_extension_id_;
104 } 106 }
105 107
106 void set_instance_id_for_test(const std::string& instance_id) { 108 void set_instance_id_for_test(const std::string& instance_id) {
107 instance_id_ = instance_id; 109 instance_id_ = instance_id;
108 } 110 }
109 111
110 private: 112 private:
(...skipping 263 matching lines...) Expand 10 before | Expand all | Expand 10 after
374 int wakeup_attempt_count_ = 0; 376 int wakeup_attempt_count_ = 0;
375 377
376 // Records the current reason the extension is being woken up. Is set to 378 // Records the current reason the extension is being woken up. Is set to
377 // MediaRouteProviderWakeReason::TOTAL_COUNT if there is no pending reason. 379 // MediaRouteProviderWakeReason::TOTAL_COUNT if there is no pending reason.
378 MediaRouteProviderWakeReason current_wake_reason_; 380 MediaRouteProviderWakeReason current_wake_reason_;
379 381
380 // A flag to ensure that we record the provider version once, during the 382 // A flag to ensure that we record the provider version once, during the
381 // initial event page wakeup attempt. 383 // initial event page wakeup attempt.
382 bool provider_version_was_recorded_ = false; 384 bool provider_version_was_recorded_ = false;
383 385
386 // A flag to ensure that mDNS discovery is only enabled on Windows when there
387 // will be appropriate context for the user to associate a firewall prompt
388 // with Media Router. This can be set to |true| earlier if we know that a
389 // prompt will not occur.
390 bool should_enable_mdns_discovery_ = true;
391
384 base::WeakPtrFactory<MediaRouterMojoImpl> weak_factory_; 392 base::WeakPtrFactory<MediaRouterMojoImpl> weak_factory_;
385 393
386 DISALLOW_COPY_AND_ASSIGN(MediaRouterMojoImpl); 394 DISALLOW_COPY_AND_ASSIGN(MediaRouterMojoImpl);
387 }; 395 };
388 396
389 } // namespace media_router 397 } // namespace media_router
390 398
391 #endif // CHROME_BROWSER_MEDIA_ROUTER_MEDIA_ROUTER_MOJO_IMPL_H_ 399 #endif // CHROME_BROWSER_MEDIA_ROUTER_MEDIA_ROUTER_MOJO_IMPL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698