OLD | NEW |
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 398 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
409 panel_host_->Zoom(content::PAGE_ZOOM_RESET); | 409 panel_host_->Zoom(content::PAGE_ZOOM_RESET); |
410 break; | 410 break; |
411 case IDC_ZOOM_MINUS: | 411 case IDC_ZOOM_MINUS: |
412 panel_host_->Zoom(content::PAGE_ZOOM_OUT); | 412 panel_host_->Zoom(content::PAGE_ZOOM_OUT); |
413 break; | 413 break; |
414 | 414 |
415 // DevTools | 415 // DevTools |
416 case IDC_DEV_TOOLS: | 416 case IDC_DEV_TOOLS: |
417 content::RecordAction(UserMetricsAction("DevTools_ToggleWindow")); | 417 content::RecordAction(UserMetricsAction("DevTools_ToggleWindow")); |
418 DevToolsWindow::OpenDevToolsWindow( | 418 DevToolsWindow::OpenDevToolsWindow( |
419 GetWebContents()->GetRenderViewHost(), | 419 GetWebContents(), |
420 DevToolsToggleAction::Show()); | 420 DevToolsToggleAction::Show()); |
421 break; | 421 break; |
422 case IDC_DEV_TOOLS_CONSOLE: | 422 case IDC_DEV_TOOLS_CONSOLE: |
423 content::RecordAction(UserMetricsAction("DevTools_ToggleConsole")); | 423 content::RecordAction(UserMetricsAction("DevTools_ToggleConsole")); |
424 DevToolsWindow::OpenDevToolsWindow( | 424 DevToolsWindow::OpenDevToolsWindow( |
425 GetWebContents()->GetRenderViewHost(), | 425 GetWebContents(), |
426 DevToolsToggleAction::ShowConsole()); | 426 DevToolsToggleAction::ShowConsole()); |
427 break; | 427 break; |
428 | 428 |
429 default: | 429 default: |
430 LOG(WARNING) << "Received unimplemented command: " << id; | 430 LOG(WARNING) << "Received unimplemented command: " << id; |
431 break; | 431 break; |
432 } | 432 } |
433 } | 433 } |
434 | 434 |
435 void Panel::Observe(int type, | 435 void Panel::Observe(int type, |
(...skipping 459 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
895 // static | 895 // static |
896 void Panel::FormatTitleForDisplay(base::string16* title) { | 896 void Panel::FormatTitleForDisplay(base::string16* title) { |
897 size_t current_index = 0; | 897 size_t current_index = 0; |
898 size_t match_index; | 898 size_t match_index; |
899 while ((match_index = title->find(L'\n', current_index)) != | 899 while ((match_index = title->find(L'\n', current_index)) != |
900 base::string16::npos) { | 900 base::string16::npos) { |
901 title->replace(match_index, 1, base::string16()); | 901 title->replace(match_index, 1, base::string16()); |
902 current_index = match_index; | 902 current_index = match_index; |
903 } | 903 } |
904 } | 904 } |
OLD | NEW |