OLD | NEW |
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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/external_tab_container_win.h" | 5 #include "chrome/browser/external_tab_container_win.h" |
6 | 6 |
7 #include <string> | 7 #include <string> |
8 | 8 |
9 #include "app/win_util.h" | 9 #include "app/win_util.h" |
10 #include "base/i18n/rtl.h" | 10 #include "base/i18n/rtl.h" |
11 #include "base/logging.h" | 11 #include "base/logging.h" |
12 #include "base/win_util.h" | 12 #include "base/win_util.h" |
13 #include "chrome/app/chrome_dll_resource.h" | 13 #include "chrome/app/chrome_dll_resource.h" |
14 #include "chrome/browser/automation/automation_provider.h" | 14 #include "chrome/browser/automation/automation_provider.h" |
15 #include "chrome/browser/automation/automation_extension_function.h" | 15 #include "chrome/browser/automation/automation_extension_function.h" |
16 #include "chrome/browser/browser_window.h" | 16 #include "chrome/browser/browser_window.h" |
17 #include "chrome/browser/debugger/devtools_manager.h" | 17 #include "chrome/browser/debugger/devtools_manager.h" |
| 18 #include "chrome/browser/debugger/devtools_toggle_action.h" |
18 #include "chrome/browser/load_notification_details.h" | 19 #include "chrome/browser/load_notification_details.h" |
19 #include "chrome/browser/page_info_window.h" | 20 #include "chrome/browser/page_info_window.h" |
20 #include "chrome/browser/profile.h" | 21 #include "chrome/browser/profile.h" |
21 #include "chrome/browser/renderer_host/render_process_host.h" | 22 #include "chrome/browser/renderer_host/render_process_host.h" |
22 #include "chrome/browser/renderer_host/render_view_host.h" | 23 #include "chrome/browser/renderer_host/render_view_host.h" |
23 #include "chrome/browser/renderer_host/resource_dispatcher_host_request_info.h" | 24 #include "chrome/browser/renderer_host/resource_dispatcher_host_request_info.h" |
24 #include "chrome/browser/tab_contents/provisional_load_details.h" | 25 #include "chrome/browser/tab_contents/provisional_load_details.h" |
25 #include "chrome/browser/views/tab_contents/render_view_context_menu_views.h" | 26 #include "chrome/browser/views/tab_contents/render_view_context_menu_views.h" |
26 #include "chrome/browser/tab_contents/tab_contents.h" | 27 #include "chrome/browser/tab_contents/tab_contents.h" |
27 #include "chrome/browser/views/tab_contents/tab_contents_container.h" | 28 #include "chrome/browser/views/tab_contents/tab_contents_container.h" |
(...skipping 792 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
820 tab_contents_->render_view_host()->Zoom(PageZoom::ZOOM_IN); | 821 tab_contents_->render_view_host()->Zoom(PageZoom::ZOOM_IN); |
821 break; | 822 break; |
822 case IDC_ZOOM_NORMAL: | 823 case IDC_ZOOM_NORMAL: |
823 tab_contents_->render_view_host()->Zoom(PageZoom::RESET); | 824 tab_contents_->render_view_host()->Zoom(PageZoom::RESET); |
824 break; | 825 break; |
825 case IDC_ZOOM_MINUS: | 826 case IDC_ZOOM_MINUS: |
826 tab_contents_->render_view_host()->Zoom(PageZoom::ZOOM_OUT); | 827 tab_contents_->render_view_host()->Zoom(PageZoom::ZOOM_OUT); |
827 break; | 828 break; |
828 case IDC_DEV_TOOLS: | 829 case IDC_DEV_TOOLS: |
829 DevToolsManager::GetInstance()->ToggleDevToolsWindow( | 830 DevToolsManager::GetInstance()->ToggleDevToolsWindow( |
830 tab_contents_->render_view_host(), false); | 831 tab_contents_->render_view_host(), DEVTOOLS_TOGGLE_ACTION_NONE); |
831 break; | 832 break; |
832 case IDC_DEV_TOOLS_CONSOLE: | 833 case IDC_DEV_TOOLS_CONSOLE: |
833 DevToolsManager::GetInstance()->ToggleDevToolsWindow( | 834 DevToolsManager::GetInstance()->ToggleDevToolsWindow( |
834 tab_contents_->render_view_host(), true); | 835 tab_contents_->render_view_host(), |
| 836 DEVTOOLS_TOGGLE_ACTION_SHOW_CONSOLE); |
| 837 break; |
| 838 case IDC_DEV_TOOLS_INSPECT: |
| 839 DevToolsManager::GetInstance()->ToggleDevToolsWindow( |
| 840 tab_contents_->render_view_host(), |
| 841 DEVTOOLS_TOGGLE_ACTION_INSPECT); |
835 break; | 842 break; |
836 default: | 843 default: |
837 NOTREACHED() << "Unsupported accelerator: " << command_id; | 844 NOTREACHED() << "Unsupported accelerator: " << command_id; |
838 return false; | 845 return false; |
839 } | 846 } |
840 return true; | 847 return true; |
841 } | 848 } |
842 | 849 |
843 void ExternalTabContainer::Navigate(const GURL& url, const GURL& referrer) { | 850 void ExternalTabContainer::Navigate(const GURL& url, const GURL& referrer) { |
844 if (!tab_contents_) { | 851 if (!tab_contents_) { |
(...skipping 119 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
964 | 971 |
965 layout->StartRow(0, 0); | 972 layout->StartRow(0, 0); |
966 layout->AddView(info_bar_container); | 973 layout->AddView(info_bar_container); |
967 layout->StartRow(1, 0); | 974 layout->StartRow(1, 0); |
968 layout->AddView(tab_contents_container_); | 975 layout->AddView(tab_contents_container_); |
969 SetContentsView(external_tab_view_); | 976 SetContentsView(external_tab_view_); |
970 // Note that SetTabContents must be called after AddChildView is called | 977 // Note that SetTabContents must be called after AddChildView is called |
971 tab_contents_container_->ChangeTabContents(tab_contents_); | 978 tab_contents_container_->ChangeTabContents(tab_contents_); |
972 } | 979 } |
973 | 980 |
OLD | NEW |