| OLD | NEW |
| 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/strings/string_number_conversions.h" | 10 #include "base/strings/string_number_conversions.h" |
| (...skipping 801 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 812 "startPage", | 812 "startPage", |
| 813 new base::StringValue(extensions::chrome_manifest_urls::GetDevToolsPage( | 813 new base::StringValue(extensions::chrome_manifest_urls::GetDevToolsPage( |
| 814 extension.get()).spec())); | 814 extension.get()).spec())); |
| 815 extension_info->Set("name", new base::StringValue(extension->name())); | 815 extension_info->Set("name", new base::StringValue(extension->name())); |
| 816 extension_info->Set("exposeExperimentalAPIs", | 816 extension_info->Set("exposeExperimentalAPIs", |
| 817 new base::FundamentalValue( | 817 new base::FundamentalValue( |
| 818 extension->permissions_data()->HasAPIPermission( | 818 extension->permissions_data()->HasAPIPermission( |
| 819 extensions::APIPermission::kExperimental))); | 819 extensions::APIPermission::kExperimental))); |
| 820 results.Append(extension_info); | 820 results.Append(extension_info); |
| 821 } | 821 } |
| 822 // TODO(dgozman): remove the |WebInspector.addExtensions| call in M45. | 822 CallClientFunction("InspectorFrontendAPI.addExtensions", |
| 823 CallClientFunction( | 823 &results, NULL, NULL); |
| 824 "(InspectorFrontendAPI.addExtensions || WebInspector.addExtensions)", | |
| 825 &results, NULL, NULL); | |
| 826 } | 824 } |
| 827 | 825 |
| 828 void DevToolsUIBindings::SetDelegate(Delegate* delegate) { | 826 void DevToolsUIBindings::SetDelegate(Delegate* delegate) { |
| 829 delegate_.reset(delegate); | 827 delegate_.reset(delegate); |
| 830 } | 828 } |
| 831 | 829 |
| 832 void DevToolsUIBindings::AttachTo( | 830 void DevToolsUIBindings::AttachTo( |
| 833 const scoped_refptr<content::DevToolsAgentHost>& agent_host) { | 831 const scoped_refptr<content::DevToolsAgentHost>& agent_host) { |
| 834 if (agent_host_.get()) | 832 if (agent_host_.get()) |
| 835 Detach(); | 833 Detach(); |
| (...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 894 if (frontend_loaded_) | 892 if (frontend_loaded_) |
| 895 return; | 893 return; |
| 896 frontend_loaded_ = true; | 894 frontend_loaded_ = true; |
| 897 | 895 |
| 898 // Call delegate first - it seeds importants bit of information. | 896 // Call delegate first - it seeds importants bit of information. |
| 899 delegate_->OnLoadCompleted(); | 897 delegate_->OnLoadCompleted(); |
| 900 | 898 |
| 901 UpdateTheme(); | 899 UpdateTheme(); |
| 902 AddDevToolsExtensionsToClient(); | 900 AddDevToolsExtensionsToClient(); |
| 903 } | 901 } |
| OLD | NEW |