| OLD | NEW |
| 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 "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/l10n_util.h" | 9 #include "app/l10n_util.h" |
| 10 #include "app/view_prop.h" | |
| 11 #include "base/debug/trace_event.h" | 10 #include "base/debug/trace_event.h" |
| 12 #include "base/i18n/rtl.h" | 11 #include "base/i18n/rtl.h" |
| 13 #include "base/logging.h" | 12 #include "base/logging.h" |
| 14 #include "base/utf_string_conversions.h" | 13 #include "base/utf_string_conversions.h" |
| 15 #include "base/win/win_util.h" | 14 #include "base/win/win_util.h" |
| 16 #include "chrome/app/chrome_command_ids.h" | 15 #include "chrome/app/chrome_command_ids.h" |
| 17 #include "chrome/app/chrome_dll_resource.h" | 16 #include "chrome/app/chrome_dll_resource.h" |
| 18 #include "chrome/browser/automation/automation_provider.h" | 17 #include "chrome/browser/automation/automation_provider.h" |
| 19 #include "chrome/browser/automation/automation_extension_function.h" | 18 #include "chrome/browser/automation/automation_extension_function.h" |
| 20 #include "chrome/browser/browser_window.h" | 19 #include "chrome/browser/browser_window.h" |
| (...skipping 18 matching lines...) Expand all Loading... |
| 39 #include "chrome/common/bindings_policy.h" | 38 #include "chrome/common/bindings_policy.h" |
| 40 #include "chrome/common/chrome_constants.h" | 39 #include "chrome/common/chrome_constants.h" |
| 41 #include "chrome/common/render_messages.h" | 40 #include "chrome/common/render_messages.h" |
| 42 #include "chrome/common/render_messages_params.h" | 41 #include "chrome/common/render_messages_params.h" |
| 43 #include "chrome/common/native_web_keyboard_event.h" | 42 #include "chrome/common/native_web_keyboard_event.h" |
| 44 #include "chrome/common/notification_service.h" | 43 #include "chrome/common/notification_service.h" |
| 45 #include "chrome/common/page_transition_types.h" | 44 #include "chrome/common/page_transition_types.h" |
| 46 #include "chrome/common/url_constants.h" | 45 #include "chrome/common/url_constants.h" |
| 47 #include "grit/generated_resources.h" | 46 #include "grit/generated_resources.h" |
| 48 #include "grit/locale_settings.h" | 47 #include "grit/locale_settings.h" |
| 48 #include "ui/base/view_prop.h" |
| 49 #include "views/grid_layout.h" | 49 #include "views/grid_layout.h" |
| 50 #include "views/widget/root_view.h" | 50 #include "views/widget/root_view.h" |
| 51 #include "views/window/window.h" | 51 #include "views/window/window.h" |
| 52 | 52 |
| 53 using app::ViewProp; | 53 using ui::ViewProp; |
| 54 | 54 |
| 55 static const char kWindowObjectKey[] = "ChromeWindowObject"; | 55 static const char kWindowObjectKey[] = "ChromeWindowObject"; |
| 56 | 56 |
| 57 // This class overrides the LinkActivated function in the PageInfoBubbleView | 57 // This class overrides the LinkActivated function in the PageInfoBubbleView |
| 58 // class and routes the help center link navigation to the host browser. | 58 // class and routes the help center link navigation to the host browser. |
| 59 class ExternalTabPageInfoBubbleView : public PageInfoBubbleView { | 59 class ExternalTabPageInfoBubbleView : public PageInfoBubbleView { |
| 60 public: | 60 public: |
| 61 ExternalTabPageInfoBubbleView(ExternalTabContainer* container, | 61 ExternalTabPageInfoBubbleView(ExternalTabContainer* container, |
| 62 gfx::NativeWindow parent_window, | 62 gfx::NativeWindow parent_window, |
| 63 Profile* profile, | 63 Profile* profile, |
| (...skipping 1049 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1113 | 1113 |
| 1114 if (disposition == CURRENT_TAB) { | 1114 if (disposition == CURRENT_TAB) { |
| 1115 DCHECK(route_all_top_level_navigations_); | 1115 DCHECK(route_all_top_level_navigations_); |
| 1116 disposition = NEW_FOREGROUND_TAB; | 1116 disposition = NEW_FOREGROUND_TAB; |
| 1117 } | 1117 } |
| 1118 ExternalTabContainer::OpenURLFromTab(source, url, referrer, disposition, | 1118 ExternalTabContainer::OpenURLFromTab(source, url, referrer, disposition, |
| 1119 transition); | 1119 transition); |
| 1120 // support only one navigation for a dummy tab before it is killed. | 1120 // support only one navigation for a dummy tab before it is killed. |
| 1121 ::DestroyWindow(GetNativeView()); | 1121 ::DestroyWindow(GetNativeView()); |
| 1122 } | 1122 } |
| OLD | NEW |