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

Unified Diff: components/view_manager/server_view.h

Issue 1317713006: Changes around how embed roots are set (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: merge to trunk Created 5 years, 3 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
« no previous file with comments | « components/view_manager/public/interfaces/view_tree.mojom ('k') | components/view_manager/server_view.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/view_manager/server_view.h
diff --git a/components/view_manager/server_view.h b/components/view_manager/server_view.h
index 3ee4447ae3659cf4fc8673dac7f4befda50e998d..40688f7976e6deeca9864c4f70f9ea922b70de78 100644
--- a/components/view_manager/server_view.h
+++ b/components/view_manager/server_view.h
@@ -44,6 +44,18 @@ class ServerView : public mojo::Surface,
void AddObserver(ServerViewObserver* observer);
void RemoveObserver(ServerViewObserver* observer);
+ // Sets the access policy that is used the next time Embed() is called.
+ void set_pending_access_policy(uint32_t policy) {
+ pending_access_policy_ = policy;
+ }
+
+ // Returns |pending_access_policy_| and resets it to the default.
+ uint32_t get_and_clear_pending_access_policy() {
+ const uint32_t policy = pending_access_policy_;
+ pending_access_policy_ = mojo::ViewTree::ACCESS_POLICY_DEFAULT;
+ return policy;
+ }
+
// Binds the provided |request| to |this| object. If an interface is already
// bound to this ServerView then the old connection is closed first.
void Bind(mojo::InterfaceRequest<Surface> request,
@@ -107,10 +119,6 @@ class ServerView : public mojo::Surface,
return last_submitted_frame_size_;
}
- // See mojom for for details.
- void set_allows_reembed(bool value) { allows_reembed_ = value; }
- bool allows_reembed() const { return allows_reembed_; }
-
// mojo::Surface:
void SubmitCompositorFrame(
mojo::CompositorFramePtr frame,
@@ -141,7 +149,7 @@ class ServerView : public mojo::Surface,
scoped_ptr<cc::SurfaceFactory> surface_factory_;
float opacity_;
gfx::Transform transform_;
- bool allows_reembed_;
+ uint32_t pending_access_policy_;
ui::TextInputState text_input_state_;
gfx::Size last_submitted_frame_size_;
« no previous file with comments | « components/view_manager/public/interfaces/view_tree.mojom ('k') | components/view_manager/server_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698