[Media Router] Add integration tests and e2e tests for media router and presentation...
[chromium-blink-merge.git] / components / view_manager / display_manager_delegate.h
blob1f0a4bee556b3977c789fac2095ede51c47fe6ed
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
3 // found in the LICENSE file.
5 #ifndef COMPONENTS_VIEW_MANAGER_DISPLAY_MANAGER_DELEGATE_H_
6 #define COMPONENTS_VIEW_MANAGER_DISPLAY_MANAGER_DELEGATE_H_
8 #include "components/view_manager/public/interfaces/view_manager.mojom.h"
10 namespace view_manager {
12 class ServerView;
14 // A DisplayManagerDelegate an interface to be implemented by an object that
15 // manages the lifetime of a DisplayManager, forwards events to the appropriate
16 // views, and responses to changes in viewport size.
17 class DisplayManagerDelegate {
18 public:
19 // Returns the root view of this display.
20 virtual ServerView* GetRootView() = 0;
22 // Called when the window managed by the DisplayManager is closed.
23 virtual void OnDisplayClosed() = 0;
25 // Called when an event arrives.
26 virtual void OnEvent(mojo::EventPtr event) = 0;
28 // Signals that the metrics of this display's viewport has changed.
29 virtual void OnViewportMetricsChanged(
30 const mojo::ViewportMetrics& old_metrics,
31 const mojo::ViewportMetrics& new_metrics) = 0;
33 protected:
34 virtual ~DisplayManagerDelegate() {}
37 } // namespace view_manager
39 #endif // COMPONENTS_VIEW_MANAGER_DISPLAY_MANAGER_DELEGATE_H_