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

Side by Side Diff: chrome/browser/ui/panels/panel.cc

Issue 108213012: [DevTools] Remove dock side knowledge from browser. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 11 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/panels/panel.h" 5 #include "chrome/browser/ui/panels/panel.h"
6 6
7 #include "base/logging.h" 7 #include "base/logging.h"
8 #include "base/message_loop/message_loop.h" 8 #include "base/message_loop/message_loop.h"
9 #include "base/strings/utf_string_conversions.h" 9 #include "base/strings/utf_string_conversions.h"
10 #include "chrome/app/chrome_command_ids.h" 10 #include "chrome/app/chrome_command_ids.h"
(...skipping 394 matching lines...) Expand 10 before | Expand all | Expand 10 after
405 case IDC_ZOOM_NORMAL: 405 case IDC_ZOOM_NORMAL:
406 panel_host_->Zoom(content::PAGE_ZOOM_RESET); 406 panel_host_->Zoom(content::PAGE_ZOOM_RESET);
407 break; 407 break;
408 case IDC_ZOOM_MINUS: 408 case IDC_ZOOM_MINUS:
409 panel_host_->Zoom(content::PAGE_ZOOM_OUT); 409 panel_host_->Zoom(content::PAGE_ZOOM_OUT);
410 break; 410 break;
411 411
412 // DevTools 412 // DevTools
413 case IDC_DEV_TOOLS: 413 case IDC_DEV_TOOLS:
414 content::RecordAction(UserMetricsAction("DevTools_ToggleWindow")); 414 content::RecordAction(UserMetricsAction("DevTools_ToggleWindow"));
415 DevToolsWindow::ToggleDevToolsWindow( 415 DevToolsWindow::OpenDevToolsWindow(
416 GetWebContents()->GetRenderViewHost(), 416 GetWebContents()->GetRenderViewHost(),
417 true,
418 DevToolsToggleAction::Show()); 417 DevToolsToggleAction::Show());
419 break; 418 break;
420 case IDC_DEV_TOOLS_CONSOLE: 419 case IDC_DEV_TOOLS_CONSOLE:
421 content::RecordAction(UserMetricsAction("DevTools_ToggleConsole")); 420 content::RecordAction(UserMetricsAction("DevTools_ToggleConsole"));
422 DevToolsWindow::ToggleDevToolsWindow( 421 DevToolsWindow::OpenDevToolsWindow(
423 GetWebContents()->GetRenderViewHost(), 422 GetWebContents()->GetRenderViewHost(),
424 true,
425 DevToolsToggleAction::ShowConsole()); 423 DevToolsToggleAction::ShowConsole());
426 break; 424 break;
427 425
428 default: 426 default:
429 LOG(WARNING) << "Received unimplemented command: " << id; 427 LOG(WARNING) << "Received unimplemented command: " << id;
430 break; 428 break;
431 } 429 }
432 } 430 }
433 431
434 void Panel::Observe(int type, 432 void Panel::Observe(int type,
(...skipping 455 matching lines...) Expand 10 before | Expand all | Expand 10 after
890 // static 888 // static
891 void Panel::FormatTitleForDisplay(base::string16* title) { 889 void Panel::FormatTitleForDisplay(base::string16* title) {
892 size_t current_index = 0; 890 size_t current_index = 0;
893 size_t match_index; 891 size_t match_index;
894 while ((match_index = title->find(L'\n', current_index)) != 892 while ((match_index = title->find(L'\n', current_index)) !=
895 base::string16::npos) { 893 base::string16::npos) {
896 title->replace(match_index, 1, base::string16()); 894 title->replace(match_index, 1, base::string16());
897 current_index = match_index; 895 current_index = match_index;
898 } 896 }
899 } 897 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698