summaryrefslogtreecommitdiffstats
path: root/pdf
diff options
context:
space:
mode:
authorwjmaclean <wjmaclean@chromium.org>2015-01-15 11:58:27 -0800
committerCommit bot <commit-bot@chromium.org>2015-01-15 20:00:35 +0000
commit91ddc475b86c272db176e93b8522d11708b0353c (patch)
tree7466d2321705bbd2b26b7315fb0109f3430025c4 /pdf
parentde9c14bda1e8f952c49cfdab12e94cb7fc473213 (diff)
downloadchromium_src-91ddc475b86c272db176e93b8522d11708b0353c.zip
chromium_src-91ddc475b86c272db176e93b8522d11708b0353c.tar.gz
chromium_src-91ddc475b86c272db176e93b8522d11708b0353c.tar.bz2
Refactor to move chrome_page_zoom functions to components/ui/zoom.
This refactor will allow non-chrome builds to access the functionality formerly provided by chrome_page_zoom. BUG=none TBR=sky@chromium.org Review URL: https://codereview.chromium.org/847703003 Cr-Commit-Position: refs/heads/master@{#311719}
Diffstat (limited to 'pdf')
-rw-r--r--pdf/BUILD.gn2
-rw-r--r--pdf/DEPS2
-rw-r--r--pdf/instance.cc10
-rw-r--r--pdf/pdf.gyp2
4 files changed, 8 insertions, 8 deletions
diff --git a/pdf/BUILD.gn b/pdf/BUILD.gn
index 5810468..b028290 100644
--- a/pdf/BUILD.gn
+++ b/pdf/BUILD.gn
@@ -45,7 +45,7 @@ shared_library("pdf") {
"resource_consts.h",
"thumbnail_control.cc",
"thumbnail_control.h",
- "../chrome/browser/chrome_page_zoom_constants.cc",
+ "../components/ui/zoom/page_zoom_constants.cc",
"../content/common/page_zoom.cc",
]
diff --git a/pdf/DEPS b/pdf/DEPS
index 37203f0..aeba85b 100644
--- a/pdf/DEPS
+++ b/pdf/DEPS
@@ -1,7 +1,7 @@
include_rules = [
- "!chrome/browser/chrome_page_zoom_constants.h",
"!chrome/common/content_restriction.h",
"!content/public/common/page_zoom.h",
+ "+components/ui/zoom/page_zoom_constants.h",
"+net",
"+ppapi",
"+third_party/pdfium/fpdfsdk/include",
diff --git a/pdf/instance.cc b/pdf/instance.cc
index 19c7a28..72b08af 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;
}
diff --git a/pdf/pdf.gyp b/pdf/pdf.gyp
index 5b37bb9..0225921 100644
--- a/pdf/pdf.gyp
+++ b/pdf/pdf.gyp
@@ -65,7 +65,7 @@
'resource_consts.h',
'thumbnail_control.cc',
'thumbnail_control.h',
- '../chrome/browser/chrome_page_zoom_constants.cc',
+ '../components/ui/zoom/page_zoom_constants.cc',
'../content/common/page_zoom.cc',
],
'conditions': [