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

Side by Side Diff: chrome/browser/ui/webui/inspect_ui.cc

Issue 1865213004: Convert //chrome/browser/ui from scoped_ptr to std::unique_ptr (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 4 years, 8 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
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 "chrome/browser/ui/webui/inspect_ui.h" 5 #include "chrome/browser/ui/webui/inspect_ui.h"
6 6
7 #include "base/macros.h" 7 #include "base/macros.h"
8 #include "base/stl_util.h" 8 #include "base/stl_util.h"
9 #include "chrome/browser/devtools/devtools_target_impl.h" 9 #include "chrome/browser/devtools/devtools_target_impl.h"
10 #include "chrome/browser/devtools/devtools_targets_ui.h" 10 #include "chrome/browser/devtools/devtools_targets_ui.h"
(...skipping 472 matching lines...) Expand 10 before | Expand all | Expand 10 after
483 kPortForwardingDefaultPort, kPortForwardingDefaultLocation); 483 kPortForwardingDefaultPort, kPortForwardingDefaultLocation);
484 prefs->Set(prefs::kDevToolsPortForwardingConfig, default_config); 484 prefs->Set(prefs::kDevToolsPortForwardingConfig, default_config);
485 } 485 }
486 486
487 const base::Value* InspectUI::GetPrefValue(const char* name) { 487 const base::Value* InspectUI::GetPrefValue(const char* name) {
488 Profile* profile = Profile::FromWebUI(web_ui()); 488 Profile* profile = Profile::FromWebUI(web_ui());
489 return profile->GetPrefs()->FindPreference(name)->GetValue(); 489 return profile->GetPrefs()->FindPreference(name)->GetValue();
490 } 490 }
491 491
492 void InspectUI::AddTargetUIHandler( 492 void InspectUI::AddTargetUIHandler(
493 scoped_ptr<DevToolsTargetsUIHandler> handler) { 493 std::unique_ptr<DevToolsTargetsUIHandler> handler) {
494 DevToolsTargetsUIHandler* handler_ptr = handler.release(); 494 DevToolsTargetsUIHandler* handler_ptr = handler.release();
495 target_handlers_[handler_ptr->source_id()] = handler_ptr; 495 target_handlers_[handler_ptr->source_id()] = handler_ptr;
496 } 496 }
497 497
498 DevToolsTargetsUIHandler* InspectUI::FindTargetHandler( 498 DevToolsTargetsUIHandler* InspectUI::FindTargetHandler(
499 const std::string& source_id) { 499 const std::string& source_id) {
500 TargetHandlerMap::iterator it = target_handlers_.find(source_id); 500 TargetHandlerMap::iterator it = target_handlers_.find(source_id);
501 return it != target_handlers_.end() ? it->second : NULL; 501 return it != target_handlers_.end() ? it->second : NULL;
502 } 502 }
503 503
(...skipping 22 matching lines...) Expand all
526 handler->ForceUpdate(); 526 handler->ForceUpdate();
527 } 527 }
528 528
529 void InspectUI::PopulatePortStatus(const base::Value& status) { 529 void InspectUI::PopulatePortStatus(const base::Value& status) {
530 web_ui()->CallJavascriptFunction("populatePortStatus", status); 530 web_ui()->CallJavascriptFunction("populatePortStatus", status);
531 } 531 }
532 532
533 void InspectUI::ShowIncognitoWarning() { 533 void InspectUI::ShowIncognitoWarning() {
534 web_ui()->CallJavascriptFunction("showIncognitoWarning"); 534 web_ui()->CallJavascriptFunction("showIncognitoWarning");
535 } 535 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/webui/inspect_ui.h ('k') | chrome/browser/ui/webui/interstitials/interstitial_ui.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698