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

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

Issue 10837296: Fix a bug where the inspector would not keep event pages alive. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: notification Created 8 years, 4 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 <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/lazy_instance.h" 9 #include "base/lazy_instance.h"
10 #include "base/string_number_conversions.h" 10 #include "base/string_number_conversions.h"
(...skipping 625 matching lines...) Expand 10 before | Expand all | Expand 10 after
636 window = Create(profile, inspected_rvh, docked, false); 636 window = Create(profile, inspected_rvh, docked, false);
637 manager->RegisterDevToolsClientHostFor(agent, window->frontend_host_); 637 manager->RegisterDevToolsClientHostFor(agent, window->frontend_host_);
638 do_open = true; 638 do_open = true;
639 } 639 }
640 640
641 // Update toolbar to reflect DevTools changes. 641 // Update toolbar to reflect DevTools changes.
642 window->UpdateBrowserToolbar(); 642 window->UpdateBrowserToolbar();
643 643
644 // If window is docked and visible, we hide it on toggle. If window is 644 // If window is docked and visible, we hide it on toggle. If window is
645 // undocked, we show (activate) it. 645 // undocked, we show (activate) it.
646 if (!window->is_docked() || do_open) 646 if (!window->is_docked() || do_open) {
yurys 2012/08/21 19:52:55 Revert this? As I remember style guide doesn't req
Matt Perry 2012/08/21 20:13:46 Oops, leftover change. Reverted.
647 window->Show(action); 647 window->Show(action);
648 else 648 } else {
649 manager->UnregisterDevToolsClientHostFor(agent); 649 manager->UnregisterDevToolsClientHostFor(agent);
650 }
650 651
651 return window; 652 return window;
652 } 653 }
653 654
654 // static 655 // static
655 DevToolsWindow* DevToolsWindow::AsDevToolsWindow( 656 DevToolsWindow* DevToolsWindow::AsDevToolsWindow(
656 DevToolsClientHost* client_host) { 657 DevToolsClientHost* client_host) {
657 if (!client_host || g_instances == NULL) 658 if (!client_host || g_instances == NULL)
658 return NULL; 659 return NULL;
659 DevToolsWindowList& instances = g_instances.Get(); 660 DevToolsWindowList& instances = g_instances.Get();
(...skipping 105 matching lines...) Expand 10 before | Expand all | Expand 10 after
765 FileSelectHelper::RunFileChooser(web_contents, params); 766 FileSelectHelper::RunFileChooser(web_contents, params);
766 } 767 }
767 768
768 void DevToolsWindow::UpdateBrowserToolbar() { 769 void DevToolsWindow::UpdateBrowserToolbar() {
769 if (!inspected_tab_) 770 if (!inspected_tab_)
770 return; 771 return;
771 BrowserWindow* inspected_window = GetInspectedBrowserWindow(); 772 BrowserWindow* inspected_window = GetInspectedBrowserWindow();
772 if (inspected_window) 773 if (inspected_window)
773 inspected_window->UpdateToolbar(inspected_tab_, false); 774 inspected_window->UpdateToolbar(inspected_tab_, false);
774 } 775 }
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/extensions/extension_process_manager.cc » ('j') | content/browser/debugger/devtools_agent_host.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698