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

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

Issue 23022006: Remove GetActiveEntry usage from content. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fixing android compile break. Created 7 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 | Annotate | Revision Log
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/devtools_http_handler_impl.h" 5 #include "content/browser/devtools/devtools_http_handler_impl.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <utility> 8 #include <utility>
9 9
10 #include "base/bind.h" 10 #include "base/bind.h"
(...skipping 798 matching lines...) Expand 10 before | Expand all | Expand 10 after
809 809
810 WebContents* web_contents = rvh->GetDelegate()->GetAsWebContents(); 810 WebContents* web_contents = rvh->GetDelegate()->GetAsWebContents();
811 if (web_contents) { 811 if (web_contents) {
812 dictionary->SetString(kTargetTitleField, UTF16ToUTF8( 812 dictionary->SetString(kTargetTitleField, UTF16ToUTF8(
813 net::EscapeForHTML(web_contents->GetTitle()))); 813 net::EscapeForHTML(web_contents->GetTitle())));
814 dictionary->SetString(kTargetUrlField, web_contents->GetURL().spec()); 814 dictionary->SetString(kTargetUrlField, web_contents->GetURL().spec());
815 dictionary->SetString(kTargetThumbnailUrlField, 815 dictionary->SetString(kTargetThumbnailUrlField,
816 std::string(kThumbUrlPrefix) + id); 816 std::string(kThumbUrlPrefix) + id);
817 817
818 NavigationController& controller = web_contents->GetController(); 818 NavigationController& controller = web_contents->GetController();
819 NavigationEntry* entry = controller.GetActiveEntry(); 819 NavigationEntry* entry = controller.GetVisibleEntry();
820 if (entry != NULL && entry->GetURL().is_valid()) { 820 if (entry != NULL && entry->GetURL().is_valid()) {
821 dictionary->SetString(kTargetFaviconUrlField, 821 dictionary->SetString(kTargetFaviconUrlField,
822 entry->GetFavicon().url.spec()); 822 entry->GetFavicon().url.spec());
823 } 823 }
824 } 824 }
825 dictionary->SetString(kTargetDescriptionField, 825 dictionary->SetString(kTargetDescriptionField,
826 delegate_->GetViewDescription(rvh)); 826 delegate_->GetViewDescription(rvh));
827 827
828 if (!agent->IsAttached()) 828 if (!agent->IsAttached())
829 SerializeDebuggerURLs(dictionary, id, host); 829 SerializeDebuggerURLs(dictionary, id, host);
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
862 host.c_str(), 862 host.c_str(),
863 kPageUrlPrefix, 863 kPageUrlPrefix,
864 id.c_str())); 864 id.c_str()));
865 std::string devtools_frontend_url = GetFrontendURLInternal( 865 std::string devtools_frontend_url = GetFrontendURLInternal(
866 id.c_str(), 866 id.c_str(),
867 host); 867 host);
868 dictionary->SetString(kTargetDevtoolsFrontendUrlField, devtools_frontend_url); 868 dictionary->SetString(kTargetDevtoolsFrontendUrlField, devtools_frontend_url);
869 } 869 }
870 870
871 } // namespace content 871 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/android/content_view_core_impl.cc ('k') | content/browser/renderer_host/render_view_host_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698