Commit e0c88059 authored by Elly Fong-Jones's avatar Elly Fong-Jones Committed by Commit Bot

pdf: use ui::TouchEditable menu constants

The ui::TouchEditable menu recently changed to use its own constants
for command IDs rather than abusing IDS constants; the uses of these
constants in //components/pdf were missed.

Bug: 10707568
Change-Id: I5ccd267b032bc4dfe4841efd6203dc53b6fddb96
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2154908Reviewed-by: default avatarSadrul Chowdhury <sadrul@chromium.org>
Reviewed-by: default avatarLei Zhang <thestig@chromium.org>
Commit-Queue: Elly Fong-Jones <ellyjones@chromium.org>
Cr-Commit-Position: refs/heads/master@{#760529}
parent a4c66592
include_rules = [ include_rules = [
"+content/public/browser", "+content/public/browser",
"+mojo/public/cpp/bindings", "+mojo/public/cpp/bindings",
"+ui/base",
"+ui/touch_selection", "+ui/touch_selection",
"+ui/strings",
] ]
specific_include_rules = { specific_include_rules = {
......
...@@ -10,9 +10,9 @@ ...@@ -10,9 +10,9 @@
#include "components/pdf/browser/pdf_web_contents_helper_client.h" #include "components/pdf/browser/pdf_web_contents_helper_client.h"
#include "content/public/browser/render_widget_host_view.h" #include "content/public/browser/render_widget_host_view.h"
#include "content/public/common/referrer_type_converters.h" #include "content/public/common/referrer_type_converters.h"
#include "ui/base/pointer/touch_editing_controller.h"
#include "ui/gfx/geometry/point_conversions.h" #include "ui/gfx/geometry/point_conversions.h"
#include "ui/gfx/geometry/point_f.h" #include "ui/gfx/geometry/point_f.h"
#include "ui/strings/grit/ui_strings.h"
namespace pdf { namespace pdf {
...@@ -170,7 +170,7 @@ bool PDFWebContentsHelper::IsCommandIdEnabled(int command_id) const { ...@@ -170,7 +170,7 @@ bool PDFWebContentsHelper::IsCommandIdEnabled(int command_id) const {
bool readable = true; bool readable = true;
switch (command_id) { switch (command_id) {
case IDS_APP_COPY: case ui::TouchEditable::kCopy:
return readable && has_selection_; return readable && has_selection_;
// TODO(wjmaclean): add logic for cut/paste as the information required // TODO(wjmaclean): add logic for cut/paste as the information required
// from PDFium becomes available. // from PDFium becomes available.
...@@ -182,7 +182,7 @@ void PDFWebContentsHelper::ExecuteCommand(int command_id, int event_flags) { ...@@ -182,7 +182,7 @@ void PDFWebContentsHelper::ExecuteCommand(int command_id, int event_flags) {
// TODO(wjmaclean, dsinclair): Need to communicate to PDFium to accept // TODO(wjmaclean, dsinclair): Need to communicate to PDFium to accept
// cut/paste commands. // cut/paste commands.
switch (command_id) { switch (command_id) {
case IDS_APP_COPY: case ui::TouchEditable::kCopy:
web_contents()->Copy(); web_contents()->Copy();
break; break;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment