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

Side by Side Diff: chrome/browser/devtools/devtools_window.cc

Issue 165213006: [DevTools] Issue zoom from DevToolsWindow instead of browser commands. (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 unified diff | Download patch
« no previous file with comments | « chrome/browser/devtools/devtools_window.h ('k') | chrome/browser/ui/browser_commands.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "chrome/browser/devtools/devtools_window.h" 5 #include "chrome/browser/devtools/devtools_window.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 8
9 #include "base/command_line.h" 9 #include "base/command_line.h"
10 #include "base/json/json_reader.h" 10 #include "base/json/json_reader.h"
(...skipping 1209 matching lines...) Expand 10 before | Expand all | Expand 10 after
1220 return; 1220 return;
1221 } 1221 }
1222 file_system_indexer_->SearchInPath(file_system_path, 1222 file_system_indexer_->SearchInPath(file_system_path,
1223 query, 1223 query,
1224 Bind(&DevToolsWindow::SearchCompleted, 1224 Bind(&DevToolsWindow::SearchCompleted,
1225 weak_factory_.GetWeakPtr(), 1225 weak_factory_.GetWeakPtr(),
1226 request_id, 1226 request_id,
1227 file_system_path)); 1227 file_system_path));
1228 } 1228 }
1229 1229
1230 void DevToolsWindow::ZoomIn() {
1231 chrome_page_zoom::Zoom(web_contents(), content::PAGE_ZOOM_IN);
1232 }
1233
1234 void DevToolsWindow::ZoomOut() {
1235 chrome_page_zoom::Zoom(web_contents(), content::PAGE_ZOOM_OUT);
1236 }
1237
1238 void DevToolsWindow::ResetZoom() {
1239 chrome_page_zoom::Zoom(web_contents(), content::PAGE_ZOOM_RESET);
1240 }
1241
1230 void DevToolsWindow::FileSavedAs(const std::string& url) { 1242 void DevToolsWindow::FileSavedAs(const std::string& url) {
1231 base::StringValue url_value(url); 1243 base::StringValue url_value(url);
1232 CallClientFunction("InspectorFrontendAPI.savedURL", &url_value, NULL, NULL); 1244 CallClientFunction("InspectorFrontendAPI.savedURL", &url_value, NULL, NULL);
1233 } 1245 }
1234 1246
1235 void DevToolsWindow::CanceledFileSaveAs(const std::string& url) { 1247 void DevToolsWindow::CanceledFileSaveAs(const std::string& url) {
1236 base::StringValue url_value(url); 1248 base::StringValue url_value(url);
1237 CallClientFunction("InspectorFrontendAPI.canceledSaveURL", 1249 CallClientFunction("InspectorFrontendAPI.canceledSaveURL",
1238 &url_value, NULL, NULL); 1250 &url_value, NULL, NULL);
1239 } 1251 }
(...skipping 281 matching lines...) Expand 10 before | Expand all | Expand 10 after
1521 } 1533 }
1522 1534
1523 void DevToolsWindow::SetLoadCompletedCallback(const base::Closure& closure) { 1535 void DevToolsWindow::SetLoadCompletedCallback(const base::Closure& closure) {
1524 if (load_state_ == kLoadCompleted) { 1536 if (load_state_ == kLoadCompleted) {
1525 if (!closure.is_null()) 1537 if (!closure.is_null())
1526 closure.Run(); 1538 closure.Run();
1527 return; 1539 return;
1528 } 1540 }
1529 load_completed_callback_ = closure; 1541 load_completed_callback_ = closure;
1530 } 1542 }
OLDNEW
« no previous file with comments | « chrome/browser/devtools/devtools_window.h ('k') | chrome/browser/ui/browser_commands.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698