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

Unified Diff: blimp/client/linux/blimp_display_manager.h

Issue 1528243002: Add a basic linux client for Blimp. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: X11, how does it work? Created 5 years 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: blimp/client/linux/blimp_display_manager.h
diff --git a/blimp/client/linux/blimp_display_manager.h b/blimp/client/linux/blimp_display_manager.h
new file mode 100644
index 0000000000000000000000000000000000000000..8927dc1dee6c474938b24d144282595abc4bb7b1
--- /dev/null
+++ b/blimp/client/linux/blimp_display_manager.h
@@ -0,0 +1,66 @@
+// Copyright 2015 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef BLIMP_CLIENT_LINUX_BLIMP_DISPLAY_MANAGER_H_
+#define BLIMP_CLIENT_LINUX_BLIMP_DISPLAY_MANAGER_H_
+
+#include "base/macros.h"
+#include "base/memory/scoped_ptr.h"
+#include "ui/platform_window/platform_window_delegate.h"
+
+namespace gfx {
+class Size;
+}
+
+namespace ui {
+class PlatformWindow;
+}
+
+namespace blimp {
+
+class BlimpCompositor;
+class RenderWidgetFeature;
+class TabControlFeature;
+
+class BlimpDisplayManagerDelegate {
+ public:
+ virtual void OnClosed() = 0;
David Trainor- moved to gerrit 2015/12/16 01:31:53 I actually probably don't need this... I can shut
+};
+
+class BlimpDisplayManager : public ui::PlatformWindowDelegate {
+ public:
+ BlimpDisplayManager(const gfx::Size& window_size,
+ BlimpDisplayManagerDelegate* delegate,
+ RenderWidgetFeature* render_widget_feature,
+ TabControlFeature* tab_control_feature);
Wez 2016/01/05 19:15:02 nit: Document object lifetime/ownership constrains
+ ~BlimpDisplayManager() override;
+
+ // ui::PlatformWindowDelegate:
Wez 2016/01/05 19:15:02 nit: ui::PlatformWindowDelegate implementation.
+ void OnBoundsChanged(const gfx::Rect& new_bounds) override;
+ void OnDamageRect(const gfx::Rect& damaged_region) override;
+ void DispatchEvent(ui::Event* event) override;
+ void OnCloseRequest() override;
+ void OnClosed() override;
+ void OnWindowStateChanged(ui::PlatformWindowState new_state) override;
+ void OnLostCapture() override;
+ void OnAcceleratedWidgetAvailable(gfx::AcceleratedWidget widget,
+ float device_pixel_ratio) override;
+ void OnAcceleratedWidgetDestroyed() override;
+ void OnActivationChanged(bool active) override;
+
+ private:
+ float device_pixel_ratio_;
Wez 2016/01/05 19:15:02 One-liner comment to explain what this is used for
+
+ BlimpDisplayManagerDelegate* delegate_;
+ TabControlFeature* tab_control_feature_;
Wez 2016/01/05 19:15:02 Inline initialize to nullptr.
+
+ scoped_ptr<BlimpCompositor> blimp_compositor_;
+ scoped_ptr<ui::PlatformWindow> platform_window_;
+
+ DISALLOW_COPY_AND_ASSIGN(BlimpDisplayManager);
+};
+
+} // namespace blimp
+
+#endif // BLIMP_CLIENT_LINUX_BLIMP_DISPLAY_MANAGER_H_

Powered by Google App Engine
This is Rietveld 408576698