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

Unified Diff: content/browser/presentation/presentation_service_impl.h

Issue 1019173002: Update mojo sdk to rev 7214b7ec7d27563b2666afad86cf1c5895c56c18 (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Keep permission service alive if embedder drops requests Created 5 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 side-by-side diff with in-line comments
Download patch
Index: content/browser/presentation/presentation_service_impl.h
diff --git a/content/browser/presentation/presentation_service_impl.h b/content/browser/presentation/presentation_service_impl.h
index 38ba4129448ff6681bc591d18659f8689e47c27a..c41adb14f5705a92844717aee3aa350f53c40c30 100644
--- a/content/browser/presentation/presentation_service_impl.h
+++ b/content/browser/presentation/presentation_service_impl.h
@@ -13,6 +13,8 @@
#include "base/gtest_prod_util.h"
#include "base/macros.h"
#include "base/memory/linked_ptr.h"
+#include "base/memory/scoped_ptr.h"
+#include "base/memory/scoped_vector.h"
#include "base/memory/weak_ptr.h"
#include "content/common/content_export.h"
#include "content/common/presentation/presentation_service.mojom.h"
@@ -83,9 +85,6 @@ class CONTENT_EXPORT PresentationServiceImpl
// (i.e. the renderer) that screen availability has changed, via Mojo.
void CallbackReceived(const ScreenAvailabilityMojoCallback& callback);
- // Clears both callback and available bit.
- void Reset();
-
// PresentationScreenAvailabilityListener implementation.
std::string GetPresentationUrl() const override;
@@ -95,12 +94,15 @@ class CONTENT_EXPORT PresentationServiceImpl
// |available|: New screen availability for the presentation URL.
void OnScreenAvailabilityChanged(bool available) override;
- // Gets the callback as a raw pointer.
- ScreenAvailabilityMojoCallback* GetCallback() const;
+ // Pass this context's queued callbacks to another context.
+ void PassPendingCallbacks(ScreenAvailabilityContext* other);
+
+ // Indicates if this context has any pending callbacks.
+ bool HasPendingCallbacks() const;
private:
std::string presentation_url_;
- scoped_ptr<ScreenAvailabilityMojoCallback> callback_ptr_;
+ ScopedVector<ScreenAvailabilityMojoCallback> callbacks_;
scoped_ptr<bool> available_ptr_;
};
« no previous file with comments | « content/browser/permissions/permission_service_impl.cc ('k') | content/browser/presentation/presentation_service_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698