| 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 #ifndef CHROME_BROWSER_EXTERNAL_TAB_CONTAINER_WIN_H_ | 5 #ifndef CHROME_BROWSER_EXTERNAL_TAB_CONTAINER_WIN_H_ |
| 6 #define CHROME_BROWSER_EXTERNAL_TAB_CONTAINER_WIN_H_ | 6 #define CHROME_BROWSER_EXTERNAL_TAB_CONTAINER_WIN_H_ |
| 7 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include <map> | 9 #include <map> |
| 10 #include <string> | 10 #include <string> |
| (...skipping 11 matching lines...) Expand all Loading... |
| 22 #include "chrome/common/navigation_types.h" | 22 #include "chrome/common/navigation_types.h" |
| 23 #include "chrome/common/notification_observer.h" | 23 #include "chrome/common/notification_observer.h" |
| 24 #include "chrome/common/notification_registrar.h" | 24 #include "chrome/common/notification_registrar.h" |
| 25 #include "views/accelerator.h" | 25 #include "views/accelerator.h" |
| 26 #include "views/widget/widget_win.h" | 26 #include "views/widget/widget_win.h" |
| 27 | 27 |
| 28 class AutomationProvider; | 28 class AutomationProvider; |
| 29 class Profile; | 29 class Profile; |
| 30 class TabContentsContainer; | 30 class TabContentsContainer; |
| 31 class RenderViewContextMenuViews; | 31 class RenderViewContextMenuViews; |
| 32 struct NavigationInfo; |
| 32 | 33 |
| 33 namespace app { | 34 namespace app { |
| 34 class ViewProp; | 35 class ViewProp; |
| 35 } | 36 } |
| 36 | 37 |
| 37 namespace IPC { | |
| 38 struct NavigationInfo; | |
| 39 } | |
| 40 | |
| 41 // This class serves as the container window for an external tab. | 38 // This class serves as the container window for an external tab. |
| 42 // An external tab is a Chrome tab that is meant to displayed in an | 39 // An external tab is a Chrome tab that is meant to displayed in an |
| 43 // external process. This class provides the FocusManger needed by the | 40 // external process. This class provides the FocusManger needed by the |
| 44 // TabContents as well as an implementation of TabContentsDelagate. | 41 // TabContents as well as an implementation of TabContentsDelagate. |
| 45 class ExternalTabContainer : public TabContentsDelegate, | 42 class ExternalTabContainer : public TabContentsDelegate, |
| 46 public NotificationObserver, | 43 public NotificationObserver, |
| 47 public views::WidgetWin, | 44 public views::WidgetWin, |
| 48 public base::RefCounted<ExternalTabContainer>, | 45 public base::RefCounted<ExternalTabContainer>, |
| 49 public views::AcceleratorTarget, | 46 public views::AcceleratorTarget, |
| 50 public InfoBarContainer::Delegate, | 47 public InfoBarContainer::Delegate, |
| (...skipping 167 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 218 | 215 |
| 219 void RunUnloadHandlers(IPC::Message* reply_message); | 216 void RunUnloadHandlers(IPC::Message* reply_message); |
| 220 | 217 |
| 221 protected: | 218 protected: |
| 222 ~ExternalTabContainer(); | 219 ~ExternalTabContainer(); |
| 223 // Overridden from views::WidgetWin: | 220 // Overridden from views::WidgetWin: |
| 224 virtual LRESULT OnCreate(LPCREATESTRUCT create_struct); | 221 virtual LRESULT OnCreate(LPCREATESTRUCT create_struct); |
| 225 virtual void OnDestroy(); | 222 virtual void OnDestroy(); |
| 226 virtual void OnFinalMessage(HWND window); | 223 virtual void OnFinalMessage(HWND window); |
| 227 | 224 |
| 228 bool InitNavigationInfo(IPC::NavigationInfo* nav_info, | 225 bool InitNavigationInfo(NavigationInfo* nav_info, |
| 229 NavigationType::Type nav_type, | 226 NavigationType::Type nav_type, |
| 230 int relative_offset); | 227 int relative_offset); |
| 231 void Navigate(const GURL& url, const GURL& referrer); | 228 void Navigate(const GURL& url, const GURL& referrer); |
| 232 | 229 |
| 233 friend class base::RefCounted<ExternalTabContainer>; | 230 friend class base::RefCounted<ExternalTabContainer>; |
| 234 | 231 |
| 235 // Helper resource automation registration method, allowing registration of | 232 // Helper resource automation registration method, allowing registration of |
| 236 // pending RenderViewHosts. | 233 // pending RenderViewHosts. |
| 237 void RegisterRenderViewHostForAutomation(RenderViewHost* render_view_host, | 234 void RegisterRenderViewHostForAutomation(RenderViewHost* render_view_host, |
| 238 bool pending_view); | 235 bool pending_view); |
| (...skipping 163 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 402 return false; | 399 return false; |
| 403 } | 400 } |
| 404 | 401 |
| 405 virtual void BeforeUnloadFired(TabContents* tab, bool proceed, | 402 virtual void BeforeUnloadFired(TabContents* tab, bool proceed, |
| 406 bool* proceed_to_fire_unload) { | 403 bool* proceed_to_fire_unload) { |
| 407 NOTREACHED(); | 404 NOTREACHED(); |
| 408 } | 405 } |
| 409 }; | 406 }; |
| 410 | 407 |
| 411 #endif // CHROME_BROWSER_EXTERNAL_TAB_CONTAINER_WIN_H_ | 408 #endif // CHROME_BROWSER_EXTERNAL_TAB_CONTAINER_WIN_H_ |
| OLD | NEW |