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

Side by Side Diff: components/view_manager/public/cpp/view_manager_delegate.h

Issue 1281663002: Mandoline: Allow submitting CompositorFrames directly to mojo::Views (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Added a TODO Created 5 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 unified diff | Download patch
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef COMPONENTS_VIEW_MANAGER_PUBLIC_CPP_VIEW_MANAGER_DELEGATE_H_ 5 #ifndef COMPONENTS_VIEW_MANAGER_PUBLIC_CPP_VIEW_MANAGER_DELEGATE_H_
6 #define COMPONENTS_VIEW_MANAGER_PUBLIC_CPP_VIEW_MANAGER_DELEGATE_H_ 6 #define COMPONENTS_VIEW_MANAGER_PUBLIC_CPP_VIEW_MANAGER_DELEGATE_H_
7 7
8 #include <string> 8 #include <string>
9 9
10 #include "components/view_manager/public/interfaces/view_manager.mojom.h" 10 #include "components/view_manager/public/interfaces/view_manager.mojom.h"
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
43 // the pipes connecting |services| and |exposed_services| to the embedder and 43 // the pipes connecting |services| and |exposed_services| to the embedder and
44 // any services obtained from them are not broken and will continue to be 44 // any services obtained from them are not broken and will continue to be
45 // valid. 45 // valid.
46 virtual void OnEmbed(View* root) = 0; 46 virtual void OnEmbed(View* root) = 0;
47 47
48 // Sent when another app is embedded in the same View as this connection. 48 // Sent when another app is embedded in the same View as this connection.
49 // Subsequently the root View and this object are destroyed (observers are 49 // Subsequently the root View and this object are destroyed (observers are
50 // notified appropriately). 50 // notified appropriately).
51 virtual void OnUnembed(); 51 virtual void OnUnembed();
52 52
53 // Sent when GPU resources are returned to the client for reuse.
54 // TODO(fsamuel): This ends up on the main thread. We need a separate
55 // interface for returned resources so we can return resources on the
56 // compositor thread
57 virtual void OnResourcesReturned(
58 mojo::Array<mojo::ReturnedResourcePtr> resources);
59
53 // Only invoked if the connection has been marked as an embed root. This 60 // Only invoked if the connection has been marked as an embed root. This
54 // allows the delegate to disallow the embed (return false), or change 61 // allows the delegate to disallow the embed (return false), or change
55 // the ServiceProviders that would be exposed to the new client. 62 // the ServiceProviders that would be exposed to the new client.
56 // 63 //
57 // This implementation returns true (allowing the embed), and does not alter 64 // This implementation returns true (allowing the embed), and does not alter
58 // the supplied ServiceProviders. 65 // the supplied ServiceProviders.
59 // 66 //
60 // See the mojom for more details. 67 // See the mojom for more details.
61 virtual void OnEmbedForDescendant(View* view, 68 virtual void OnEmbedForDescendant(View* view,
62 URLRequestPtr request, 69 URLRequestPtr request,
63 ViewManagerClientPtr* client); 70 ViewManagerClientPtr* client);
64 71
65 // Called from the destructor of ViewManager after all the Views have been 72 // Called from the destructor of ViewManager after all the Views have been
66 // destroyed. |view_manager| is no longer valid after this call. 73 // destroyed. |view_manager| is no longer valid after this call.
67 virtual void OnViewManagerDestroyed(ViewManager* view_manager) = 0; 74 virtual void OnViewManagerDestroyed(ViewManager* view_manager) = 0;
68 75
69 protected: 76 protected:
70 virtual ~ViewManagerDelegate() {} 77 virtual ~ViewManagerDelegate() {}
71 }; 78 };
72 79
73 } // namespace mojo 80 } // namespace mojo
74 81
75 #endif // COMPONENTS_VIEW_MANAGER_PUBLIC_CPP_VIEW_MANAGER_DELEGATE_H_ 82 #endif // COMPONENTS_VIEW_MANAGER_PUBLIC_CPP_VIEW_MANAGER_DELEGATE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698