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

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

Issue 847703003: Refactor to move chrome_page_zoom functions to components/ui/zoom. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix Mac compile. Created 5 years, 11 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/chrome_page_zoom_unittest.cc ('k') | chrome/browser/devtools/devtools_window.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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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_ui_bindings.h" 5 #include "chrome/browser/devtools/devtools_ui_bindings.h"
6 6
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "base/json/json_reader.h" 8 #include "base/json/json_reader.h"
9 #include "base/json/json_writer.h" 9 #include "base/json/json_writer.h"
10 #include "base/metrics/histogram.h" 10 #include "base/metrics/histogram.h"
11 #include "base/strings/string_number_conversions.h" 11 #include "base/strings/string_number_conversions.h"
12 #include "base/strings/string_util.h" 12 #include "base/strings/string_util.h"
13 #include "base/strings/stringprintf.h" 13 #include "base/strings/stringprintf.h"
14 #include "base/strings/utf_string_conversions.h" 14 #include "base/strings/utf_string_conversions.h"
15 #include "base/values.h" 15 #include "base/values.h"
16 #include "chrome/browser/chrome_notification_types.h" 16 #include "chrome/browser/chrome_notification_types.h"
17 #include "chrome/browser/chrome_page_zoom.h"
18 #include "chrome/browser/devtools/devtools_target_impl.h" 17 #include "chrome/browser/devtools/devtools_target_impl.h"
19 #include "chrome/browser/extensions/chrome_extension_web_contents_observer.h" 18 #include "chrome/browser/extensions/chrome_extension_web_contents_observer.h"
20 #include "chrome/browser/infobars/infobar_service.h" 19 #include "chrome/browser/infobars/infobar_service.h"
21 #include "chrome/browser/profiles/profile.h" 20 #include "chrome/browser/profiles/profile.h"
22 #include "chrome/browser/themes/theme_properties.h" 21 #include "chrome/browser/themes/theme_properties.h"
23 #include "chrome/browser/themes/theme_service.h" 22 #include "chrome/browser/themes/theme_service.h"
24 #include "chrome/browser/themes/theme_service_factory.h" 23 #include "chrome/browser/themes/theme_service_factory.h"
25 #include "chrome/browser/ui/browser.h" 24 #include "chrome/browser/ui/browser.h"
26 #include "chrome/browser/ui/browser_iterator.h" 25 #include "chrome/browser/ui/browser_iterator.h"
27 #include "chrome/browser/ui/browser_list.h" 26 #include "chrome/browser/ui/browser_list.h"
28 #include "chrome/browser/ui/browser_window.h" 27 #include "chrome/browser/ui/browser_window.h"
29 #include "chrome/browser/ui/tabs/tab_strip_model.h" 28 #include "chrome/browser/ui/tabs/tab_strip_model.h"
30 #include "chrome/common/chrome_switches.h" 29 #include "chrome/common/chrome_switches.h"
31 #include "chrome/common/extensions/chrome_manifest_url_handlers.h" 30 #include "chrome/common/extensions/chrome_manifest_url_handlers.h"
32 #include "chrome/common/url_constants.h" 31 #include "chrome/common/url_constants.h"
33 #include "chrome/grit/generated_resources.h" 32 #include "chrome/grit/generated_resources.h"
34 #include "components/infobars/core/confirm_infobar_delegate.h" 33 #include "components/infobars/core/confirm_infobar_delegate.h"
35 #include "components/infobars/core/infobar.h" 34 #include "components/infobars/core/infobar.h"
35 #include "components/ui/zoom/page_zoom.h"
36 #include "content/public/browser/favicon_status.h" 36 #include "content/public/browser/favicon_status.h"
37 #include "content/public/browser/invalidate_type.h" 37 #include "content/public/browser/invalidate_type.h"
38 #include "content/public/browser/navigation_controller.h" 38 #include "content/public/browser/navigation_controller.h"
39 #include "content/public/browser/navigation_entry.h" 39 #include "content/public/browser/navigation_entry.h"
40 #include "content/public/browser/notification_source.h" 40 #include "content/public/browser/notification_source.h"
41 #include "content/public/browser/render_frame_host.h" 41 #include "content/public/browser/render_frame_host.h"
42 #include "content/public/browser/render_view_host.h" 42 #include "content/public/browser/render_view_host.h"
43 #include "content/public/browser/user_metrics.h" 43 #include "content/public/browser/user_metrics.h"
44 #include "content/public/browser/web_contents.h" 44 #include "content/public/browser/web_contents.h"
45 #include "content/public/browser/web_contents_observer.h" 45 #include "content/public/browser/web_contents_observer.h"
(...skipping 568 matching lines...) Expand 10 before | Expand all | Expand 10 after
614 request_id, 614 request_id,
615 file_system_path)); 615 file_system_path));
616 } 616 }
617 617
618 void DevToolsUIBindings::SetWhitelistedShortcuts( 618 void DevToolsUIBindings::SetWhitelistedShortcuts(
619 const std::string& message) { 619 const std::string& message) {
620 delegate_->SetWhitelistedShortcuts(message); 620 delegate_->SetWhitelistedShortcuts(message);
621 } 621 }
622 622
623 void DevToolsUIBindings::ZoomIn() { 623 void DevToolsUIBindings::ZoomIn() {
624 chrome_page_zoom::Zoom(web_contents(), content::PAGE_ZOOM_IN); 624 ui_zoom::PageZoom::Zoom(web_contents(), content::PAGE_ZOOM_IN);
625 } 625 }
626 626
627 void DevToolsUIBindings::ZoomOut() { 627 void DevToolsUIBindings::ZoomOut() {
628 chrome_page_zoom::Zoom(web_contents(), content::PAGE_ZOOM_OUT); 628 ui_zoom::PageZoom::Zoom(web_contents(), content::PAGE_ZOOM_OUT);
629 } 629 }
630 630
631 void DevToolsUIBindings::ResetZoom() { 631 void DevToolsUIBindings::ResetZoom() {
632 chrome_page_zoom::Zoom(web_contents(), content::PAGE_ZOOM_RESET); 632 ui_zoom::PageZoom::Zoom(web_contents(), content::PAGE_ZOOM_RESET);
633 } 633 }
634 634
635 static void InspectTarget(Profile* profile, DevToolsTargetImpl* target) { 635 static void InspectTarget(Profile* profile, DevToolsTargetImpl* target) {
636 if (target) 636 if (target)
637 target->Inspect(profile); 637 target->Inspect(profile);
638 } 638 }
639 639
640 void DevToolsUIBindings::OpenUrlOnRemoteDeviceAndInspect( 640 void DevToolsUIBindings::OpenUrlOnRemoteDeviceAndInspect(
641 const std::string& browser_id, 641 const std::string& browser_id,
642 const std::string& url) { 642 const std::string& url) {
(...skipping 260 matching lines...) Expand 10 before | Expand all | Expand 10 after
903 if (frontend_loaded_) 903 if (frontend_loaded_)
904 return; 904 return;
905 frontend_loaded_ = true; 905 frontend_loaded_ = true;
906 906
907 // Call delegate first - it seeds importants bit of information. 907 // Call delegate first - it seeds importants bit of information.
908 delegate_->OnLoadCompleted(); 908 delegate_->OnLoadCompleted();
909 909
910 UpdateTheme(); 910 UpdateTheme();
911 AddDevToolsExtensionsToClient(); 911 AddDevToolsExtensionsToClient();
912 } 912 }
OLDNEW
« no previous file with comments | « chrome/browser/chrome_page_zoom_unittest.cc ('k') | chrome/browser/devtools/devtools_window.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698