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

Unified Diff: chrome/renderer/render_view.cc

Issue 7320: Rename various text zoom related stuff to be more generic, since we now can... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 12 years, 2 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 | « chrome/renderer/render_view.h ('k') | webkit/glue/webview.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/renderer/render_view.cc
===================================================================
--- chrome/renderer/render_view.cc (revision 3355)
+++ chrome/renderer/render_view.cc (working copy)
@@ -24,8 +24,8 @@
#include "chrome/common/gfx/color_utils.h"
#include "chrome/common/jstemplate_builder.h"
#include "chrome/common/l10n_util.h"
+#include "chrome/common/page_zoom.h"
#include "chrome/common/resource_bundle.h"
-#include "chrome/common/text_zoom.h"
#include "chrome/common/thumbnail_score.h"
#include "chrome/common/chrome_plugin_lib.h"
#include "chrome/renderer/about_handler.h"
@@ -289,7 +289,7 @@
IPC_MESSAGE_HANDLER(ViewMsg_SelectAll, OnSelectAll)
IPC_MESSAGE_HANDLER(ViewMsg_CopyImageAt, OnCopyImageAt)
IPC_MESSAGE_HANDLER(ViewMsg_Find, OnFind)
- IPC_MESSAGE_HANDLER(ViewMsg_AlterTextSize, OnAlterTextSize)
+ IPC_MESSAGE_HANDLER(ViewMsg_Zoom, OnZoom)
IPC_MESSAGE_HANDLER(ViewMsg_SetPageEncoding, OnSetPageEncoding)
IPC_MESSAGE_HANDLER(ViewMsg_InspectElement, OnInspectElement)
IPC_MESSAGE_HANDLER(ViewMsg_ShowJavaScriptConsole, OnShowJavaScriptConsole)
@@ -2159,16 +2159,17 @@
Send(new ViewHostMsg_DnsPrefetch(host_names));
}
-void RenderView::OnAlterTextSize(int size) {
- switch (size) {
- case text_zoom::TEXT_SMALLER:
- webview()->MakeTextSmaller();
+void RenderView::OnZoom(int function) {
+ static const bool kZoomIsTextOnly = false;
+ switch (function) {
+ case PageZoom::SMALLER:
+ webview()->ZoomIn(kZoomIsTextOnly);
break;
- case text_zoom::TEXT_STANDARD:
- webview()->MakeTextStandardSize();
+ case PageZoom::STANDARD:
+ webview()->ResetZoom();
break;
- case text_zoom::TEXT_LARGER:
- webview()->MakeTextLarger();
+ case PageZoom::LARGER:
+ webview()->ZoomIn(kZoomIsTextOnly);
break;
default:
NOTREACHED();
« no previous file with comments | « chrome/renderer/render_view.h ('k') | webkit/glue/webview.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698