Chromium Code Reviews| 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 <stddef.h> | 7 #include <stddef.h> |
| 8 | 8 |
| 9 #include <utility> | 9 #include <utility> |
| 10 | 10 |
| (...skipping 517 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 528 callback.Run(nullptr); | 528 callback.Run(nullptr); |
| 529 } | 529 } |
| 530 | 530 |
| 531 void DevToolsUIBindings::InspectElementCompleted() { | 531 void DevToolsUIBindings::InspectElementCompleted() { |
| 532 delegate_->InspectElementCompleted(); | 532 delegate_->InspectElementCompleted(); |
| 533 } | 533 } |
| 534 | 534 |
| 535 void DevToolsUIBindings::InspectedURLChanged(const std::string& url) { | 535 void DevToolsUIBindings::InspectedURLChanged(const std::string& url) { |
| 536 content::NavigationController& controller = web_contents()->GetController(); | 536 content::NavigationController& controller = web_contents()->GetController(); |
| 537 content::NavigationEntry* entry = controller.GetActiveEntry(); | 537 content::NavigationEntry* entry = controller.GetActiveEntry(); |
| 538 // DevTools UI is not localized. | 538 // DevTools UI is not localized. |
|
ncarter (slow)
2016/07/13 18:56:02
question for charlie: can we/should we need to do
Charlie Reis
2016/07/13 21:02:23
I think we need to keep it for cases that use it b
afakhry
2016/07/13 22:10:27
Done, added the comment.
| |
| 539 entry->SetTitle( | 539 web_contents()->UpdateTitleForEntry( |
| 540 base::UTF8ToUTF16(base::StringPrintf(kTitleFormat, url.c_str()))); | 540 entry, base::UTF8ToUTF16(base::StringPrintf(kTitleFormat, url.c_str()))); |
| 541 web_contents()->NotifyNavigationStateChanged(content::INVALIDATE_TYPE_TITLE); | |
| 542 } | 541 } |
| 543 | 542 |
| 544 void DevToolsUIBindings::LoadNetworkResource(const DispatchCallback& callback, | 543 void DevToolsUIBindings::LoadNetworkResource(const DispatchCallback& callback, |
| 545 const std::string& url, | 544 const std::string& url, |
| 546 const std::string& headers, | 545 const std::string& headers, |
| 547 int stream_id) { | 546 int stream_id) { |
| 548 GURL gurl(url); | 547 GURL gurl(url); |
| 549 if (!gurl.is_valid()) { | 548 if (!gurl.is_valid()) { |
| 550 base::DictionaryValue response; | 549 base::DictionaryValue response; |
| 551 response.SetInteger("statusCode", 404); | 550 response.SetInteger("statusCode", 404); |
| (...skipping 549 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1101 void DevToolsUIBindings::FrontendLoaded() { | 1100 void DevToolsUIBindings::FrontendLoaded() { |
| 1102 if (frontend_loaded_) | 1101 if (frontend_loaded_) |
| 1103 return; | 1102 return; |
| 1104 frontend_loaded_ = true; | 1103 frontend_loaded_ = true; |
| 1105 | 1104 |
| 1106 // Call delegate first - it seeds importants bit of information. | 1105 // Call delegate first - it seeds importants bit of information. |
| 1107 delegate_->OnLoadCompleted(); | 1106 delegate_->OnLoadCompleted(); |
| 1108 | 1107 |
| 1109 AddDevToolsExtensionsToClient(); | 1108 AddDevToolsExtensionsToClient(); |
| 1110 } | 1109 } |
| OLD | NEW |