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

Unified Diff: ui/ozone/platform/dri/gpu_platform_support_host_gbm.h

Issue 522463005: [Ozone-GBM] Handle GPU crashes (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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 side-by-side diff with in-line comments
Download patch
Index: ui/ozone/platform/dri/gpu_platform_support_host_gbm.h
diff --git a/ui/ozone/platform/dri/gpu_platform_support_host_gbm.h b/ui/ozone/platform/dri/gpu_platform_support_host_gbm.h
index 4887bae5b4e485fea0eb059301b528c1c1fce998..2e6c36000edc6b02fad8705956d6825d0775dd02 100644
--- a/ui/ozone/platform/dri/gpu_platform_support_host_gbm.h
+++ b/ui/ozone/platform/dri/gpu_platform_support_host_gbm.h
@@ -8,6 +8,7 @@
#include <queue>
#include <vector>
+#include "base/observer_list.h"
#include "ui/gfx/native_widget_types.h"
#include "ui/ozone/platform/dri/hardware_cursor_delegate.h"
#include "ui/ozone/public/gpu_platform_support_host.h"
@@ -20,6 +21,8 @@ class Point;
namespace ui {
+class ChannelObserver;
+
class GpuPlatformSupportHostGbm : public GpuPlatformSupportHost,
public HardwareCursorDelegate,
public IPC::Sender {
@@ -30,6 +33,9 @@ class GpuPlatformSupportHostGbm : public GpuPlatformSupportHost,
void RegisterHandler(GpuPlatformSupportHost* handler);
void UnregisterHandler(GpuPlatformSupportHost* handler);
+ void AddChannelObserver(ChannelObserver* observer);
+ void RemoveChannelObserver(ChannelObserver* observer);
+
// GpuPlatformSupportHost:
virtual void OnChannelEstablished(int host_id, IPC::Sender* sender) OVERRIDE;
virtual void OnChannelDestroyed(int host_id) OVERRIDE;
@@ -55,6 +61,7 @@ class GpuPlatformSupportHostGbm : public GpuPlatformSupportHost,
// delay sending them until the channel is created. These messages are stored
// in |queued_messaged_|.
std::queue<IPC::Message*> queued_messages_;
+ ObserverList<ChannelObserver> channel_observers_;
};
} // namespace ui

Powered by Google App Engine
This is Rietveld 408576698