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

Unified Diff: chrome/browser/ui/browser_commands.cc

Issue 139983006: [DevTools] Handle frontend zoom similarly to tab zoom. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 10 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
« chrome/browser/ui/browser.cc ('K') | « chrome/browser/ui/browser.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/browser_commands.cc
diff --git a/chrome/browser/ui/browser_commands.cc b/chrome/browser/ui/browser_commands.cc
index 309ee6c7686184990201738fe66cbc99c65d5aea..27a4b119d66b96b22aedda7f2e14c781f61a0852 100644
--- a/chrome/browser/ui/browser_commands.cc
+++ b/chrome/browser/ui/browser_commands.cc
@@ -68,6 +68,7 @@
#include "content/public/browser/notification_service.h"
#include "content/public/browser/page_navigator.h"
#include "content/public/browser/render_view_host.h"
+#include "content/public/browser/render_widget_host_view.h"
#include "content/public/browser/user_metrics.h"
#include "content/public/browser/web_contents.h"
#include "content/public/browser/web_contents_view.h"
@@ -891,8 +892,13 @@ void FindInPage(Browser* browser, bool find_next, bool forward_direction) {
}
void Zoom(Browser* browser, content::PageZoom zoom) {
- if (browser->is_devtools())
+ DevToolsWindow* devtools = DevToolsWindow::GetDockedInstanceForInspectedTab(
+ browser->tab_strip_model()->GetActiveWebContents());
vsevik 2014/02/12 15:13:43 nit: You could extract browser->tab_strip_model()-
dgozman 2014/02/12 16:27:16 Done.
+ if (devtools && devtools->web_contents()->GetRenderWidgetHostView() &&
+ devtools->web_contents()->GetRenderWidgetHostView()->HasFocus()) {
+ chrome_page_zoom::Zoom(devtools->web_contents(), zoom);
return;
+ }
chrome_page_zoom::Zoom(browser->tab_strip_model()->GetActiveWebContents(),
zoom);
« chrome/browser/ui/browser.cc ('K') | « chrome/browser/ui/browser.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698