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

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

Issue 2019423005: Move //components/ui/zoom to top-level under //components (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 4 years, 6 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/browser_commands_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 <stddef.h> 7 #include <stddef.h>
8 #include <utility> 8 #include <utility>
9 9
10 #include "base/json/json_reader.h" 10 #include "base/json/json_reader.h"
(...skipping 21 matching lines...) Expand all
32 #include "chrome/browser/ui/tabs/tab_strip_model.h" 32 #include "chrome/browser/ui/tabs/tab_strip_model.h"
33 #include "chrome/common/chrome_switches.h" 33 #include "chrome/common/chrome_switches.h"
34 #include "chrome/common/extensions/chrome_manifest_url_handlers.h" 34 #include "chrome/common/extensions/chrome_manifest_url_handlers.h"
35 #include "chrome/common/pref_names.h" 35 #include "chrome/common/pref_names.h"
36 #include "chrome/common/url_constants.h" 36 #include "chrome/common/url_constants.h"
37 #include "chrome/grit/generated_resources.h" 37 #include "chrome/grit/generated_resources.h"
38 #include "components/infobars/core/confirm_infobar_delegate.h" 38 #include "components/infobars/core/confirm_infobar_delegate.h"
39 #include "components/infobars/core/infobar.h" 39 #include "components/infobars/core/infobar.h"
40 #include "components/prefs/scoped_user_pref_update.h" 40 #include "components/prefs/scoped_user_pref_update.h"
41 #include "components/syncable_prefs/pref_service_syncable.h" 41 #include "components/syncable_prefs/pref_service_syncable.h"
42 #include "components/ui/zoom/page_zoom.h" 42 #include "components/zoom/page_zoom.h"
43 #include "content/public/browser/devtools_external_agent_proxy.h" 43 #include "content/public/browser/devtools_external_agent_proxy.h"
44 #include "content/public/browser/devtools_external_agent_proxy_delegate.h" 44 #include "content/public/browser/devtools_external_agent_proxy_delegate.h"
45 #include "content/public/browser/invalidate_type.h" 45 #include "content/public/browser/invalidate_type.h"
46 #include "content/public/browser/navigation_controller.h" 46 #include "content/public/browser/navigation_controller.h"
47 #include "content/public/browser/navigation_entry.h" 47 #include "content/public/browser/navigation_entry.h"
48 #include "content/public/browser/notification_source.h" 48 #include "content/public/browser/notification_source.h"
49 #include "content/public/browser/render_frame_host.h" 49 #include "content/public/browser/render_frame_host.h"
50 #include "content/public/browser/render_view_host.h" 50 #include "content/public/browser/render_view_host.h"
51 #include "content/public/browser/user_metrics.h" 51 #include "content/public/browser/user_metrics.h"
52 #include "content/public/browser/web_contents.h" 52 #include "content/public/browser/web_contents.h"
(...skipping 613 matching lines...) Expand 10 before | Expand all | Expand 10 after
666 weak_factory_.GetWeakPtr(), 666 weak_factory_.GetWeakPtr(),
667 search_request_id, 667 search_request_id,
668 file_system_path)); 668 file_system_path));
669 } 669 }
670 670
671 void DevToolsUIBindings::SetWhitelistedShortcuts(const std::string& message) { 671 void DevToolsUIBindings::SetWhitelistedShortcuts(const std::string& message) {
672 delegate_->SetWhitelistedShortcuts(message); 672 delegate_->SetWhitelistedShortcuts(message);
673 } 673 }
674 674
675 void DevToolsUIBindings::ZoomIn() { 675 void DevToolsUIBindings::ZoomIn() {
676 ui_zoom::PageZoom::Zoom(web_contents(), content::PAGE_ZOOM_IN); 676 zoom::PageZoom::Zoom(web_contents(), content::PAGE_ZOOM_IN);
677 } 677 }
678 678
679 void DevToolsUIBindings::ZoomOut() { 679 void DevToolsUIBindings::ZoomOut() {
680 ui_zoom::PageZoom::Zoom(web_contents(), content::PAGE_ZOOM_OUT); 680 zoom::PageZoom::Zoom(web_contents(), content::PAGE_ZOOM_OUT);
681 } 681 }
682 682
683 void DevToolsUIBindings::ResetZoom() { 683 void DevToolsUIBindings::ResetZoom() {
684 ui_zoom::PageZoom::Zoom(web_contents(), content::PAGE_ZOOM_RESET); 684 zoom::PageZoom::Zoom(web_contents(), content::PAGE_ZOOM_RESET);
685 } 685 }
686 686
687 void DevToolsUIBindings::SetDevicesDiscoveryConfig( 687 void DevToolsUIBindings::SetDevicesDiscoveryConfig(
688 bool discover_usb_devices, 688 bool discover_usb_devices,
689 bool port_forwarding_enabled, 689 bool port_forwarding_enabled,
690 const std::string& port_forwarding_config) { 690 const std::string& port_forwarding_config) {
691 base::DictionaryValue* config_dict = nullptr; 691 base::DictionaryValue* config_dict = nullptr;
692 std::unique_ptr<base::Value> parsed_config = 692 std::unique_ptr<base::Value> parsed_config =
693 base::JSONReader::Read(port_forwarding_config); 693 base::JSONReader::Read(port_forwarding_config);
694 if (!parsed_config || !parsed_config->GetAsDictionary(&config_dict)) 694 if (!parsed_config || !parsed_config->GetAsDictionary(&config_dict))
(...skipping 397 matching lines...) Expand 10 before | Expand all | Expand 10 after
1092 void DevToolsUIBindings::FrontendLoaded() { 1092 void DevToolsUIBindings::FrontendLoaded() {
1093 if (frontend_loaded_) 1093 if (frontend_loaded_)
1094 return; 1094 return;
1095 frontend_loaded_ = true; 1095 frontend_loaded_ = true;
1096 1096
1097 // Call delegate first - it seeds importants bit of information. 1097 // Call delegate first - it seeds importants bit of information.
1098 delegate_->OnLoadCompleted(); 1098 delegate_->OnLoadCompleted();
1099 1099
1100 AddDevToolsExtensionsToClient(); 1100 AddDevToolsExtensionsToClient();
1101 } 1101 }
OLDNEW
« no previous file with comments | « chrome/browser/browser_commands_unittest.cc ('k') | chrome/browser/devtools/devtools_window.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698