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

Side by Side Diff: content/browser/devtools/render_frame_devtools_agent_host.cc

Issue 2300703005: DevTools: merge devtools_http_handler into content - it is used in all the embedders anyways. (Closed)
Patch Set: for_landing! Created 4 years, 3 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 | « content/browser/devtools/forwarding_agent_host.cc ('k') | content/public/browser/BUILD.gn » ('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 "content/browser/devtools/render_frame_devtools_agent_host.h" 5 #include "content/browser/devtools/render_frame_devtools_agent_host.h"
6 6
7 #include <tuple> 7 #include <tuple>
8 #include <utility> 8 #include <utility>
9 9
10 #include "base/guid.h" 10 #include "base/guid.h"
(...skipping 886 matching lines...) Expand 10 before | Expand all | Expand 10 after
897 result = manager->delegate()->GetTargetTitle(current_->host()); 897 result = manager->delegate()->GetTargetTitle(current_->host());
898 if (!result.empty()) 898 if (!result.empty())
899 return result; 899 return result;
900 content::WebContents* web_contents = GetWebContents(); 900 content::WebContents* web_contents = GetWebContents();
901 if (web_contents) 901 if (web_contents)
902 result = base::UTF16ToUTF8(web_contents->GetTitle()); 902 result = base::UTF16ToUTF8(web_contents->GetTitle());
903 return GetURL().spec(); 903 return GetURL().spec();
904 } 904 }
905 905
906 std::string RenderFrameDevToolsAgentHost::GetDescription() { 906 std::string RenderFrameDevToolsAgentHost::GetDescription() {
907 DevToolsManager* manager = DevToolsManager::GetInstance();
908 if (manager->delegate())
909 return manager->delegate()->GetTargetDescription(current_->host());
907 return ""; 910 return "";
908 } 911 }
909 912
910 GURL RenderFrameDevToolsAgentHost::GetURL() { 913 GURL RenderFrameDevToolsAgentHost::GetURL() {
911 // Order is important here. 914 // Order is important here.
912 WebContents* web_contents = GetWebContents(); 915 WebContents* web_contents = GetWebContents();
913 if (web_contents && !IsChildFrame()) 916 if (web_contents && !IsChildFrame())
914 return web_contents->GetVisibleURL(); 917 return web_contents->GetVisibleURL();
915 if (pending_) 918 if (pending_)
916 return pending_->host()->GetLastCommittedURL(); 919 return pending_->host()->GetLastCommittedURL();
(...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after
1023 RenderFrameHost* host) { 1026 RenderFrameHost* host) {
1024 return (current_ && current_->host() == host) || 1027 return (current_ && current_->host() == host) ||
1025 (pending_ && pending_->host() == host); 1028 (pending_ && pending_->host() == host);
1026 } 1029 }
1027 1030
1028 bool RenderFrameDevToolsAgentHost::IsChildFrame() { 1031 bool RenderFrameDevToolsAgentHost::IsChildFrame() {
1029 return current_ && current_->host()->GetParent(); 1032 return current_ && current_->host()->GetParent();
1030 } 1033 }
1031 1034
1032 } // namespace content 1035 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/devtools/forwarding_agent_host.cc ('k') | content/public/browser/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698