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

Unified Diff: pdf/instance.cc

Issue 847703003: Refactor to move chrome_page_zoom functions to components/ui/zoom. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix Mac compile. Created 5 years, 11 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 | « pdf/DEPS ('k') | pdf/pdf.gyp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pdf/instance.cc
diff --git a/pdf/instance.cc b/pdf/instance.cc
index 19c7a28e17348bd0a3c4932f63db511c25dfd763..72b08af0b79c48d12aa4525b2adf2c374cc6e510 100644
--- a/pdf/instance.cc
+++ b/pdf/instance.cc
@@ -17,8 +17,8 @@
#include "base/strings/string_split.h"
#include "base/strings/string_util.h"
#include "base/values.h"
-#include "chrome/browser/chrome_page_zoom_constants.h"
#include "chrome/common/content_restriction.h"
+#include "components/ui/zoom/page_zoom_constants.h"
#include "content/public/common/page_zoom.h"
#include "net/base/escape.h"
#include "pdf/draw_utils.h"
@@ -2574,14 +2574,14 @@ void Instance::UpdateZoomScale() {
double Instance::CalculateZoom(uint32 control_id) const {
if (control_id == kZoomInButtonId) {
- for (size_t i = 0; i < chrome_page_zoom::kPresetZoomFactorsSize; ++i) {
- double current_zoom = chrome_page_zoom::kPresetZoomFactors[i];
+ for (size_t i = 0; i < ui_zoom::kPresetZoomFactorsSize; ++i) {
+ double current_zoom = ui_zoom::kPresetZoomFactors[i];
if (current_zoom - content::kEpsilon > zoom_)
return current_zoom;
}
} else {
- for (size_t i = chrome_page_zoom::kPresetZoomFactorsSize; i > 0; --i) {
- double current_zoom = chrome_page_zoom::kPresetZoomFactors[i - 1];
+ for (size_t i = ui_zoom::kPresetZoomFactorsSize; i > 0; --i) {
+ double current_zoom = ui_zoom::kPresetZoomFactors[i - 1];
if (current_zoom + content::kEpsilon < zoom_)
return current_zoom;
}
« no previous file with comments | « pdf/DEPS ('k') | pdf/pdf.gyp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698