Index: third_party/grpc/src/core/channel/client_uchannel.h |
diff --git a/third_party/WebKit/Source/core/page/PagePopupSupplement.cpp b/third_party/grpc/src/core/channel/client_uchannel.h |
similarity index 57% |
copy from third_party/WebKit/Source/core/page/PagePopupSupplement.cpp |
copy to third_party/grpc/src/core/channel/client_uchannel.h |
index 292269915552e540ddd0839a0a38be327c925203..92a831493cfbf7625850c3da82b930bcc72ac01e 100644 |
--- a/third_party/WebKit/Source/core/page/PagePopupSupplement.cpp |
+++ b/third_party/grpc/src/core/channel/client_uchannel.h |
@@ -1,5 +1,7 @@ |
/* |
- * Copyright (C) 2012 Google Inc. All rights reserved. |
+ * |
+ * Copyright 2015, Google Inc. |
+ * All rights reserved. |
* |
* Redistribution and use in source and binary forms, with or without |
* modification, are permitted provided that the following conditions are |
@@ -26,48 +28,33 @@ |
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE |
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
+ * |
*/ |
-#include "core/page/PagePopupSupplement.h" |
+#ifndef GRPC_INTERNAL_CORE_CHANNEL_CLIENT_MICROCHANNEL_H |
+#define GRPC_INTERNAL_CORE_CHANNEL_CLIENT_MICROCHANNEL_H |
-#include "core/page/PagePopupController.h" |
+#include "src/core/channel/channel_stack.h" |
+#include "src/core/client_config/resolver.h" |
-namespace blink { |
+#define GRPC_MICROCHANNEL_SUBCHANNEL_ARG "grpc.microchannel_subchannel_key" |
-PagePopupSupplement::PagePopupSupplement(PagePopup& popup, PagePopupClient* popupClient) |
- : m_controller(PagePopupController::create(popup, popupClient)) |
-{ |
- ASSERT(popupClient); |
-} |
+/* A client microchannel (aka uchannel) is a channel wrapping a subchannel, for |
+ * the purposes of lightweight RPC communications from within the core.*/ |
-const char* PagePopupSupplement::supplementName() |
-{ |
- return "PagePopupSupplement"; |
-} |
+extern const grpc_channel_filter grpc_client_uchannel_filter; |
-PagePopupController* PagePopupSupplement::pagePopupController(LocalFrame& frame) |
-{ |
- PagePopupSupplement* supplement = static_cast<PagePopupSupplement*>(from(&frame, supplementName())); |
- ASSERT(supplement); |
- return supplement->m_controller.get(); |
-} |
+grpc_connectivity_state grpc_client_uchannel_check_connectivity_state( |
+ grpc_exec_ctx *exec_ctx, grpc_channel_element *elem, int try_to_connect); |
-void PagePopupSupplement::install(LocalFrame& frame, PagePopup& popup, PagePopupClient* popupClient) |
-{ |
- ASSERT(popupClient); |
- provideTo(frame, supplementName(), new PagePopupSupplement(popup, popupClient)); |
-} |
+void grpc_client_uchannel_watch_connectivity_state( |
+ grpc_exec_ctx *exec_ctx, grpc_channel_element *elem, grpc_pollset *pollset, |
+ grpc_connectivity_state *state, grpc_closure *on_complete); |
-void PagePopupSupplement::uninstall(LocalFrame& frame) |
-{ |
- pagePopupController(frame)->clearPagePopupClient(); |
- frame.removeSupplement(supplementName()); |
-} |
+grpc_channel *grpc_client_uchannel_create(grpc_subchannel *subchannel, |
+ grpc_channel_args *args); |
-DEFINE_TRACE(PagePopupSupplement) |
-{ |
- visitor->trace(m_controller); |
- Supplement<LocalFrame>::trace(visitor); |
-} |
+void grpc_client_uchannel_set_connected_subchannel( |
+ grpc_channel *uchannel, grpc_connected_subchannel *connected_subchannel); |
-} // namespace blink |
+#endif /* GRPC_INTERNAL_CORE_CHANNEL_CLIENT_MICROCHANNEL_H */ |