| 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/external_tab_container_win.h" | 5 #include "chrome/browser/external_tab/external_tab_container_win.h" |
| 6 | 6 |
| 7 #include <string> | 7 #include <string> |
| 8 | 8 |
| 9 #include "base/bind.h" | 9 #include "base/bind.h" |
| 10 #include "base/bind_helpers.h" | 10 #include "base/bind_helpers.h" |
| 11 #include "base/debug/trace_event.h" | 11 #include "base/debug/trace_event.h" |
| 12 #include "base/i18n/rtl.h" | 12 #include "base/i18n/rtl.h" |
| 13 #include "base/logging.h" | 13 #include "base/logging.h" |
| 14 #include "base/memory/scoped_ptr.h" | 14 #include "base/memory/scoped_ptr.h" |
| 15 #include "base/string16.h" |
| 15 #include "base/utf_string_conversions.h" | 16 #include "base/utf_string_conversions.h" |
| 16 #include "base/win/win_util.h" | 17 #include "base/win/win_util.h" |
| 17 #include "chrome/app/chrome_command_ids.h" | 18 #include "chrome/app/chrome_command_ids.h" |
| 18 #include "chrome/app/chrome_dll_resource.h" | 19 #include "chrome/app/chrome_dll_resource.h" |
| 19 #include "chrome/browser/automation/automation_provider.h" | 20 #include "chrome/browser/automation/automation_provider.h" |
| 20 #include "chrome/browser/debugger/devtools_toggle_action.h" | 21 #include "chrome/browser/debugger/devtools_toggle_action.h" |
| 21 #include "chrome/browser/debugger/devtools_window.h" | 22 #include "chrome/browser/debugger/devtools_window.h" |
| 22 #include "chrome/browser/history/history_tab_helper.h" | 23 #include "chrome/browser/history/history_tab_helper.h" |
| 23 #include "chrome/browser/history/history_types.h" | 24 #include "chrome/browser/history/history_types.h" |
| 24 #include "chrome/browser/infobars/infobar_tab_helper.h" | 25 #include "chrome/browser/infobars/infobar_tab_helper.h" |
| (...skipping 501 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 526 | 527 |
| 527 bool ExternalTabContainer::IsPopupOrPanel(const WebContents* source) const { | 528 bool ExternalTabContainer::IsPopupOrPanel(const WebContents* source) const { |
| 528 return is_popup_window_; | 529 return is_popup_window_; |
| 529 } | 530 } |
| 530 | 531 |
| 531 void ExternalTabContainer::UpdateTargetURL(WebContents* source, | 532 void ExternalTabContainer::UpdateTargetURL(WebContents* source, |
| 532 int32 page_id, | 533 int32 page_id, |
| 533 const GURL& url) { | 534 const GURL& url) { |
| 534 Browser::UpdateTargetURLHelper(source, page_id, url); | 535 Browser::UpdateTargetURLHelper(source, page_id, url); |
| 535 if (automation_) { | 536 if (automation_) { |
| 536 std::wstring url_string = CA2W(url.spec().c_str()); | 537 string16 url_string = CA2W(url.spec().c_str()); |
| 537 automation_->Send( | 538 automation_->Send( |
| 538 new AutomationMsg_UpdateTargetUrl(tab_handle_, url_string)); | 539 new AutomationMsg_UpdateTargetUrl(tab_handle_, url_string)); |
| 539 } | 540 } |
| 540 } | 541 } |
| 541 | 542 |
| 542 void ExternalTabContainer::ContentsZoomChange(bool zoom_in) { | 543 void ExternalTabContainer::ContentsZoomChange(bool zoom_in) { |
| 543 } | 544 } |
| 544 | 545 |
| 545 gfx::NativeWindow ExternalTabContainer::GetFrameNativeWindow() { | 546 gfx::NativeWindow ExternalTabContainer::GetFrameNativeWindow() { |
| 546 return hwnd(); | 547 return hwnd(); |
| (...skipping 661 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1208 if (params.disposition == CURRENT_TAB) { | 1209 if (params.disposition == CURRENT_TAB) { |
| 1209 DCHECK(route_all_top_level_navigations_); | 1210 DCHECK(route_all_top_level_navigations_); |
| 1210 forward_params.disposition = NEW_FOREGROUND_TAB; | 1211 forward_params.disposition = NEW_FOREGROUND_TAB; |
| 1211 } | 1212 } |
| 1212 WebContents* new_contents = | 1213 WebContents* new_contents = |
| 1213 ExternalTabContainer::OpenURLFromTab(source, forward_params); | 1214 ExternalTabContainer::OpenURLFromTab(source, forward_params); |
| 1214 // support only one navigation for a dummy tab before it is killed. | 1215 // support only one navigation for a dummy tab before it is killed. |
| 1215 ::DestroyWindow(GetNativeView()); | 1216 ::DestroyWindow(GetNativeView()); |
| 1216 return new_contents; | 1217 return new_contents; |
| 1217 } | 1218 } |
| OLD | NEW |