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

Side by Side Diff: content/renderer/pepper/renderer_ppapi_host_impl.h

Issue 2094843002: Scale menu position back to viewport in pepper plugin (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@2743
Patch Set: Created 4 years, 5 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 (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 CONTENT_RENDERER_PEPPER_RENDERER_PPAPI_HOST_IMPL_H_ 5 #ifndef CONTENT_RENDERER_PEPPER_RENDERER_PPAPI_HOST_IMPL_H_
6 #define CONTENT_RENDERER_PEPPER_RENDERER_PPAPI_HOST_IMPL_H_ 6 #define CONTENT_RENDERER_PEPPER_RENDERER_PPAPI_HOST_IMPL_H_
7 7
8 #include <memory> 8 #include <memory>
9 9
10 #include "base/macros.h" 10 #include "base/macros.h"
(...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after
97 bool IsRunningInProcess() const override; 97 bool IsRunningInProcess() const override;
98 std::string GetPluginName() const override; 98 std::string GetPluginName() const override;
99 void SetToExternalPluginHost() override; 99 void SetToExternalPluginHost() override;
100 void CreateBrowserResourceHosts( 100 void CreateBrowserResourceHosts(
101 PP_Instance instance, 101 PP_Instance instance,
102 const std::vector<IPC::Message>& nested_msgs, 102 const std::vector<IPC::Message>& nested_msgs,
103 const base::Callback<void(const std::vector<int>&)>& callback) 103 const base::Callback<void(const std::vector<int>&)>& callback)
104 const override; 104 const override;
105 GURL GetDocumentURL(PP_Instance pp_instance) const override; 105 GURL GetDocumentURL(PP_Instance pp_instance) const override;
106 106
107 void set_viewport_to_dip_scale(float viewport_to_dip_scale) {
108 DCHECK_LT(0, viewport_to_dip_scale_);
109 viewport_to_dip_scale_ = viewport_to_dip_scale;
110 }
111
107 private: 112 private:
108 RendererPpapiHostImpl(PluginModule* module, 113 RendererPpapiHostImpl(PluginModule* module,
109 ppapi::proxy::HostDispatcher* dispatcher, 114 ppapi::proxy::HostDispatcher* dispatcher,
110 const ppapi::PpapiPermissions& permissions); 115 const ppapi::PpapiPermissions& permissions);
111 RendererPpapiHostImpl(PluginModule* module, 116 RendererPpapiHostImpl(PluginModule* module,
112 const ppapi::PpapiPermissions& permissions); 117 const ppapi::PpapiPermissions& permissions);
113 118
114 // Retrieves the plugin instance object associated with the given PP_Instance 119 // Retrieves the plugin instance object associated with the given PP_Instance
115 // and validates that it is one of the instances associated with our module. 120 // and validates that it is one of the instances associated with our module.
116 // Returns NULL on failure. 121 // Returns NULL on failure.
(...skipping 12 matching lines...) Expand all
129 134
130 // Null when running out-of-process. 135 // Null when running out-of-process.
131 std::unique_ptr<PepperInProcessRouter> in_process_router_; 136 std::unique_ptr<PepperInProcessRouter> in_process_router_;
132 137
133 // Whether the plugin is running in process. 138 // Whether the plugin is running in process.
134 bool is_running_in_process_; 139 bool is_running_in_process_;
135 140
136 // Whether this is a host for external plugins. 141 // Whether this is a host for external plugins.
137 bool is_external_plugin_host_; 142 bool is_external_plugin_host_;
138 143
144 // The scale between the viewport and dip.
145 float viewport_to_dip_scale_ = 1.0f;
146
139 DISALLOW_COPY_AND_ASSIGN(RendererPpapiHostImpl); 147 DISALLOW_COPY_AND_ASSIGN(RendererPpapiHostImpl);
140 }; 148 };
141 149
142 } // namespace content 150 } // namespace content
143 151
144 #endif // CONTENT_RENDERER_PEPPER_RENDERER_PPAPI_HOST_IMPL_H_ 152 #endif // CONTENT_RENDERER_PEPPER_RENDERER_PPAPI_HOST_IMPL_H_
OLDNEW
« no previous file with comments | « content/renderer/pepper/pepper_plugin_instance_impl.cc ('k') | content/renderer/pepper/renderer_ppapi_host_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698