summaryrefslogtreecommitdiffstats
path: root/chrome/browser
diff options
context:
space:
mode:
Diffstat (limited to 'chrome/browser')
-rw-r--r--chrome/browser/browser_commands.cc12
-rw-r--r--chrome/browser/render_view_host.cc4
-rw-r--r--chrome/browser/render_view_host.h9
-rw-r--r--chrome/browser/tab_contents.h1
4 files changed, 11 insertions, 15 deletions
diff --git a/chrome/browser/browser_commands.cc b/chrome/browser/browser_commands.cc
index 12d70ce..cca8754 100644
--- a/chrome/browser/browser_commands.cc
+++ b/chrome/browser/browser_commands.cc
@@ -512,8 +512,8 @@ void Browser::ExecuteCommand(int id) {
UserMetrics::RecordAction(L"ZoomPlus", profile_);
TabContents* current_tab = GetSelectedTabContents();
if (current_tab->AsWebContents()) {
- current_tab->AsWebContents()->render_view_host()->AlterTextSize(
- text_zoom::TEXT_LARGER);
+ current_tab->AsWebContents()->render_view_host()->Zoom(
+ PageZoom::LARGER);
}
break;
}
@@ -522,8 +522,8 @@ void Browser::ExecuteCommand(int id) {
UserMetrics::RecordAction(L"ZoomMinus", profile_);
TabContents* current_tab = GetSelectedTabContents();
if (current_tab->AsWebContents()) {
- current_tab->AsWebContents()->render_view_host()->AlterTextSize(
- text_zoom::TEXT_SMALLER);
+ current_tab->AsWebContents()->render_view_host()->Zoom(
+ PageZoom::SMALLER);
}
break;
}
@@ -532,8 +532,8 @@ void Browser::ExecuteCommand(int id) {
UserMetrics::RecordAction(L"ZoomNormal", profile_);
TabContents* current_tab = GetSelectedTabContents();
if (current_tab->AsWebContents()) {
- current_tab->AsWebContents()->render_view_host()->AlterTextSize(
- text_zoom::TEXT_STANDARD);
+ current_tab->AsWebContents()->render_view_host()->Zoom(
+ PageZoom::STANDARD);
}
break;
}
diff --git a/chrome/browser/render_view_host.cc b/chrome/browser/render_view_host.cc
index d269017..990e4c0 100644
--- a/chrome/browser/render_view_host.cc
+++ b/chrome/browser/render_view_host.cc
@@ -326,8 +326,8 @@ void RenderViewHost::StopFinding(bool clear_selection) {
Send(new ViewMsg_StopFinding(routing_id_, clear_selection));
}
-void RenderViewHost::AlterTextSize(text_zoom::TextSize size) {
- Send(new ViewMsg_AlterTextSize(routing_id_, size));
+void RenderViewHost::Zoom(PageZoom::Function function) {
+ Send(new ViewMsg_Zoom(routing_id_, function));
}
void RenderViewHost::SetPageEncoding(const std::wstring& encoding_name) {
diff --git a/chrome/browser/render_view_host.h b/chrome/browser/render_view_host.h
index 13b40ac..c0ebefe 100644
--- a/chrome/browser/render_view_host.h
+++ b/chrome/browser/render_view_host.h
@@ -11,6 +11,7 @@
#include "base/scoped_handle.h"
#include "chrome/browser/render_view_host_delegate.h"
#include "chrome/browser/render_widget_host.h"
+#include "chrome/common/page_zoom.h"
#ifdef CHROME_PERSONALIZATION
#include "chrome/personalization/personalization.h"
#endif
@@ -39,10 +40,6 @@ namespace net {
enum LoadState;
}
-namespace text_zoom {
-enum TextSize;
-}
-
namespace webkit_glue {
struct WebApplicationInfo;
}
@@ -188,8 +185,8 @@ class RenderViewHost : public RenderWidgetHost {
// clear the selection on the focused frame.
void StopFinding(bool clear_selection);
- // Change the text size of the page.
- void AlterTextSize(text_zoom::TextSize size);
+ // Change the zoom level of a page.
+ void Zoom(PageZoom::Function function);
// Change the encoding of the page.
void SetPageEncoding(const std::wstring& encoding_name);
diff --git a/chrome/browser/tab_contents.h b/chrome/browser/tab_contents.h
index 583358f..fc6fa04 100644
--- a/chrome/browser/tab_contents.h
+++ b/chrome/browser/tab_contents.h
@@ -14,7 +14,6 @@
#include "chrome/browser/page_navigator.h"
#include "chrome/browser/tab_contents_type.h"
#include "chrome/common/navigation_types.h"
-#include "chrome/common/text_zoom.h"
namespace gfx {
class Rect;