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

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

Issue 6816056: Fix the behaviour of "JavaScript Console" menu item. (Closed) Base URL: http://git.chromium.org/git/chromium.git@trunk
Patch Set: Created 9 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 | Annotate | Revision Log
« no previous file with comments | « chrome/browser/debugger/devtools_manager.cc ('k') | chrome/browser/ui/browser.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 "base/command_line.h" 5 #include "base/command_line.h"
6 #include "base/json/json_writer.h" 6 #include "base/json/json_writer.h"
7 #include "base/string_number_conversions.h" 7 #include "base/string_number_conversions.h"
8 #include "base/utf_string_conversions.h" 8 #include "base/utf_string_conversions.h"
9 #include "base/values.h" 9 #include "base/values.h"
10 #include "chrome/browser/browser_process.h" 10 #include "chrome/browser/browser_process.h"
(...skipping 338 matching lines...) Expand 10 before | Expand all | Expand 10 after
349 if (is_loaded_) 349 if (is_loaded_)
350 DoAction(); 350 DoAction();
351 } 351 }
352 352
353 void DevToolsWindow::DoAction() { 353 void DevToolsWindow::DoAction() {
354 UpdateFrontendAttachedState(); 354 UpdateFrontendAttachedState();
355 // TODO: these messages should be pushed through the WebKit API instead. 355 // TODO: these messages should be pushed through the WebKit API instead.
356 switch (action_on_load_) { 356 switch (action_on_load_) {
357 case DEVTOOLS_TOGGLE_ACTION_SHOW_CONSOLE: 357 case DEVTOOLS_TOGGLE_ACTION_SHOW_CONSOLE:
358 tab_contents_->render_view_host()->ExecuteJavascriptInWebFrame( 358 tab_contents_->render_view_host()->ExecuteJavascriptInWebFrame(
359 string16(), ASCIIToUTF16("WebInspector.showConsole();")); 359 string16(), ASCIIToUTF16("WebInspector.toggleConsole();"));
360 break; 360 break;
361 case DEVTOOLS_TOGGLE_ACTION_INSPECT: 361 case DEVTOOLS_TOGGLE_ACTION_INSPECT:
362 tab_contents_->render_view_host()->ExecuteJavascriptInWebFrame( 362 tab_contents_->render_view_host()->ExecuteJavascriptInWebFrame(
363 string16(), ASCIIToUTF16("WebInspector.toggleSearchingForNode();")); 363 string16(), ASCIIToUTF16("WebInspector.toggleSearchingForNode();"));
364 case DEVTOOLS_TOGGLE_ACTION_NONE: 364 case DEVTOOLS_TOGGLE_ACTION_NONE:
365 // Do nothing. 365 // Do nothing.
366 break; 366 break;
367 default: 367 default:
368 NOTREACHED(); 368 NOTREACHED();
369 } 369 }
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after
439 return false; 439 return false;
440 } 440 }
441 441
442 void DevToolsWindow::HandleKeyboardEvent(const NativeWebKeyboardEvent& event) { 442 void DevToolsWindow::HandleKeyboardEvent(const NativeWebKeyboardEvent& event) {
443 if (docked_) { 443 if (docked_) {
444 BrowserWindow* inspected_window = GetInspectedBrowserWindow(); 444 BrowserWindow* inspected_window = GetInspectedBrowserWindow();
445 if (inspected_window) 445 if (inspected_window)
446 inspected_window->HandleKeyboardEvent(event); 446 inspected_window->HandleKeyboardEvent(event);
447 } 447 }
448 } 448 }
OLDNEW
« no previous file with comments | « chrome/browser/debugger/devtools_manager.cc ('k') | chrome/browser/ui/browser.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698