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

Side by Side Diff: content/shell/browser/webkit_test_controller.cc

Issue 1079843002: DevTools: allow storing devtools preferences on the browser side. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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/shell/browser/webkit_test_controller.h" 5 #include "content/shell/browser/webkit_test_controller.h"
6 6
7 #include <iostream> 7 #include <iostream>
8 8
9 #include "base/base64.h" 9 #include "base/base64.h"
10 #include "base/command_line.h" 10 #include "base/command_line.h"
(...skipping 565 matching lines...) Expand 10 before | Expand all | Expand 10 after
576 should_override_prefs_ = true; 576 should_override_prefs_ = true;
577 prefs_ = prefs; 577 prefs_ = prefs;
578 } 578 }
579 579
580 void WebKitTestController::OnClearDevToolsLocalStorage() { 580 void WebKitTestController::OnClearDevToolsLocalStorage() {
581 ShellBrowserContext* browser_context = 581 ShellBrowserContext* browser_context =
582 ShellContentBrowserClient::Get()->browser_context(); 582 ShellContentBrowserClient::Get()->browser_context();
583 StoragePartition* storage_partition = 583 StoragePartition* storage_partition =
584 BrowserContext::GetStoragePartition(browser_context, NULL); 584 BrowserContext::GetStoragePartition(browser_context, NULL);
585 storage_partition->GetDOMStorageContext()->DeleteLocalStorage( 585 storage_partition->GetDOMStorageContext()->DeleteLocalStorage(
586 content::LayoutTestDevToolsFrontend::GetDevToolsPathAsURL("", "") 586 content::LayoutTestDevToolsFrontend::GetDevToolsPathAsURL("")
587 .GetOrigin()); 587 .GetOrigin());
588 } 588 }
589 589
590 void WebKitTestController::OnShowDevTools(const std::string& settings, 590 void WebKitTestController::OnShowDevTools(const std::string& test_path,
591 const std::string& frontend_url) { 591 const std::string& frontend_url) {
592 if (!devtools_frontend_) { 592 if (!devtools_frontend_) {
593 devtools_frontend_ = LayoutTestDevToolsFrontend::Show( 593 devtools_frontend_ = LayoutTestDevToolsFrontend::Show(
594 main_window_->web_contents(), settings, frontend_url); 594 main_window_->web_contents(), test_path, frontend_url);
595 } else { 595 } else {
596 devtools_frontend_->ReuseFrontend(settings, frontend_url); 596 devtools_frontend_->ReuseFrontend(test_path, frontend_url);
597 } 597 }
598 devtools_frontend_->Activate(); 598 devtools_frontend_->Activate();
599 devtools_frontend_->Focus(); 599 devtools_frontend_->Focus();
600 } 600 }
601 601
602 void WebKitTestController::OnCloseDevTools() { 602 void WebKitTestController::OnCloseDevTools() {
603 if (devtools_frontend_) 603 if (devtools_frontend_)
604 devtools_frontend_->DisconnectFromTarget(); 604 devtools_frontend_->DisconnectFromTarget();
605 } 605 }
606 606
(...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after
696 696
697 printer_->AddErrorMessage( 697 printer_->AddErrorMessage(
698 base::StringPrintf("#LEAK - renderer pid %d (%s)", current_pid_, 698 base::StringPrintf("#LEAK - renderer pid %d (%s)", current_pid_,
699 result.detail.c_str())); 699 result.detail.c_str()));
700 CHECK(!crash_when_leak_found_); 700 CHECK(!crash_when_leak_found_);
701 701
702 DiscardMainWindow(); 702 DiscardMainWindow();
703 } 703 }
704 704
705 } // namespace content 705 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698