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

Side by Side Diff: chrome/browser/debugger/devtools_window.cc

Issue 8515027: Define the public version of the browser side RenderProcessHost interface. This interface is not ... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 9 years, 1 month 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) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 <algorithm> 5 #include <algorithm>
6 6
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "base/json/json_writer.h" 8 #include "base/json/json_writer.h"
9 #include "base/stringprintf.h" 9 #include "base/stringprintf.h"
10 #include "base/string_number_conversions.h" 10 #include "base/string_number_conversions.h"
(...skipping 608 matching lines...) Expand 10 before | Expand all | Expand 10 after
619 DevToolsClientHost* host = manager->GetDevToolsClientHostFor(inspected_rvh); 619 DevToolsClientHost* host = manager->GetDevToolsClientHostFor(inspected_rvh);
620 DevToolsWindow* window = AsDevToolsWindow(host); 620 DevToolsWindow* window = AsDevToolsWindow(host);
621 if (host != NULL && window == NULL) { 621 if (host != NULL && window == NULL) {
622 // Break remote debugging / extension debugging session. 622 // Break remote debugging / extension debugging session.
623 manager->UnregisterDevToolsClientHostFor(inspected_rvh); 623 manager->UnregisterDevToolsClientHostFor(inspected_rvh);
624 } 624 }
625 625
626 bool do_open = force_open; 626 bool do_open = force_open;
627 if (!window) { 627 if (!window) {
628 Profile* profile = Profile::FromBrowserContext( 628 Profile* profile = Profile::FromBrowserContext(
629 inspected_rvh->process()->browser_context()); 629 inspected_rvh->process()->GetBrowserContext());
630 bool docked = profile->GetPrefs()->GetBoolean(prefs::kDevToolsOpenDocked); 630 bool docked = profile->GetPrefs()->GetBoolean(prefs::kDevToolsOpenDocked);
631 window = Create(profile, inspected_rvh, docked, false); 631 window = Create(profile, inspected_rvh, docked, false);
632 manager->RegisterDevToolsClientHostFor(inspected_rvh, window); 632 manager->RegisterDevToolsClientHostFor(inspected_rvh, window);
633 do_open = true; 633 do_open = true;
634 } 634 }
635 635
636 // If window is docked and visible, we hide it on toggle. If window is 636 // If window is docked and visible, we hide it on toggle. If window is
637 // undocked, we show (activate) it. 637 // undocked, we show (activate) it.
638 if (!window->is_docked() || do_open) 638 if (!window->is_docked() || do_open)
639 window->Show(action); 639 window->Show(action);
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
682 RequestSetDocked(false); 682 RequestSetDocked(false);
683 } 683 }
684 684
685 content::JavaScriptDialogCreator* DevToolsWindow::GetJavaScriptDialogCreator() { 685 content::JavaScriptDialogCreator* DevToolsWindow::GetJavaScriptDialogCreator() {
686 if (inspected_tab_ && inspected_tab_->tab_contents()->delegate()) { 686 if (inspected_tab_ && inspected_tab_->tab_contents()->delegate()) {
687 return inspected_tab_->tab_contents()->delegate()-> 687 return inspected_tab_->tab_contents()->delegate()->
688 GetJavaScriptDialogCreator(); 688 GetJavaScriptDialogCreator();
689 } 689 }
690 return TabContentsDelegate::GetJavaScriptDialogCreator(); 690 return TabContentsDelegate::GetJavaScriptDialogCreator();
691 } 691 }
OLDNEW
« no previous file with comments | « chrome/browser/chromeos/status/memory_menu_button.cc ('k') | chrome/browser/download/download_extension_api.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698