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

Unified Diff: extensions/browser/guest_view/guest_view_base.h

Issue 934303003: Fixed the bug that caused extension options not to fit their overlays properly when zoomed. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Addressed comments. Created 5 years, 10 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
Index: extensions/browser/guest_view/guest_view_base.h
diff --git a/extensions/browser/guest_view/guest_view_base.h b/extensions/browser/guest_view/guest_view_base.h
index 3024d2f5ff224f0998ced1e2226de679db23691b..d3fb07f0874dd4e8d9ff3991d36a3c13dc2ad821 100644
--- a/extensions/browser/guest_view/guest_view_base.h
+++ b/extensions/browser/guest_view/guest_view_base.h
@@ -293,6 +293,20 @@ class GuestViewBase : public content::BrowserPluginGuestDelegate,
~GuestViewBase() override;
+ // Convert sizes in pixels from logical to physical numbers of pixels.
+ // Note that a size can consist of a fractional number of logical pixels
+ // (hence |logical_pixels| is represented as a double), but will always
+ // consist of an integral number of physical pixels (hence the return value
+ // is represented as an int).
+ int LogicalPixelsToPhysicalPixels(double logical_pixels);
+
+ // Convert sizes in pixels from physical to logical numbers of pixels.
+ // Note that a size can consist of a fractional number of logical pixels
+ // (hence the return value is represented as a double), but will always
+ // consist of an integral number of physical pixels (hence |physical_pixels|
+ // is represented as an int).
+ double PhysicalPixelsToLogicalPixels(int physical_pixels);
+
// WebContentsObserver implementation.
void DidStopLoading(content::RenderViewHost* render_view_host) final;
void RenderViewReady() final;
@@ -343,20 +357,6 @@ class GuestViewBase : public content::BrowserPluginGuestDelegate,
// Get the zoom factor for the embedder's web contents.
double GetEmbedderZoomFactor();
- // Convert sizes in pixels from logical to physical numbers of pixels.
- // Note that a size can consist of a fractional number of logical pixels
- // (hence |logical_pixels| is represented as a double), but will always
- // consist of an integral number of physical pixels (hence the return value
- // is represented as an int).
- int LogicalPixelsToPhysicalPixels(double logical_pixels);
-
- // Convert sizes in pixels from physical to logical numbers of pixels.
- // Note that a size can consist of a fractional number of logical pixels
- // (hence the return value is represented as a double), but will always
- // consist of an integral number of physical pixels (hence |physical_pixels|
- // is represented as an int).
- double PhysicalPixelsToLogicalPixels(int physical_pixels);
-
void SetUpSizing(const base::DictionaryValue& params);
void StartTrackingEmbedderZoomLevel();

Powered by Google App Engine
This is Rietveld 408576698