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

Unified Diff: chrome/browser/guestview/webview/webview_guest.cc

Issue 232773011: Zoom Extension API (work in progress) (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Took callbacks, zoom modes, and observer stuff out of content, and reimplemented similar functional… Created 6 years, 8 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
Index: chrome/browser/guestview/webview/webview_guest.cc
diff --git a/chrome/browser/guestview/webview/webview_guest.cc b/chrome/browser/guestview/webview/webview_guest.cc
index a57a445e5dc99288c4e68244b08519da1159852d..ae725aa089be6bd7b11fcc2335ecfac404218a01 100644
--- a/chrome/browser/guestview/webview/webview_guest.cc
+++ b/chrome/browser/guestview/webview/webview_guest.cc
@@ -16,6 +16,7 @@
#include "chrome/browser/guestview/guestview_constants.h"
#include "chrome/browser/guestview/webview/webview_constants.h"
#include "chrome/browser/guestview/webview/webview_permission_types.h"
+#include "chrome/browser/ui/zoom/zoom_controller.h"
#include "chrome/common/chrome_version_info.h"
#include "content/public/browser/browser_thread.h"
#include "content/public/browser/native_web_keyboard_event.h"
@@ -506,8 +507,10 @@ void WebViewGuest::Observe(int type,
}
void WebViewGuest::SetZoom(double zoom_factor) {
+ ZoomController* zoom_controller =
+ ZoomController::FromWebContents(guest_web_contents());
double zoom_level = content::ZoomFactorToZoomLevel(zoom_factor);
- guest_web_contents()->SetZoomLevel(zoom_level);
+ zoom_controller->SetZoomLevel(zoom_level);
scoped_ptr<base::DictionaryValue> args(new base::DictionaryValue());
args->SetDouble(webview::kOldZoomFactor, current_zoom_factor_);
« no previous file with comments | « chrome/browser/extensions/api/tabs/tabs_test.cc ('k') | chrome/browser/ui/views/location_bar/zoom_bubble_view.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698