| OLD | NEW |
| 1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2006-2008 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_H_ | 5 #ifndef CHROME_BROWSER_EXTERNAL_TAB_CONTAINER_H_ |
| 6 #define CHROME_BROWSER_EXTERNAL_TAB_CONTAINER_H_ | 6 #define CHROME_BROWSER_EXTERNAL_TAB_CONTAINER_H_ |
| 7 | 7 |
| 8 #include <atlbase.h> | 8 #include <atlbase.h> |
| 9 #include <atlapp.h> | 9 #include <atlapp.h> |
| 10 #include <atlcrack.h> | 10 #include <atlcrack.h> |
| (...skipping 23 matching lines...) Expand all Loading... |
| 34 public views::Widget, | 34 public views::Widget, |
| 35 public views::KeystrokeListener, | 35 public views::KeystrokeListener, |
| 36 public CWindowImpl<ExternalTabContainer, | 36 public CWindowImpl<ExternalTabContainer, |
| 37 CWindow, | 37 CWindow, |
| 38 CWinTraits<WS_POPUP | | 38 CWinTraits<WS_POPUP | |
| 39 WS_CLIPCHILDREN>> { | 39 WS_CLIPCHILDREN>> { |
| 40 public: | 40 public: |
| 41 BEGIN_MSG_MAP(ExternalTabContainer) | 41 BEGIN_MSG_MAP(ExternalTabContainer) |
| 42 MESSAGE_HANDLER(WM_SIZE, OnSize) | 42 MESSAGE_HANDLER(WM_SIZE, OnSize) |
| 43 MESSAGE_HANDLER(WM_SETFOCUS, OnSetFocus) | 43 MESSAGE_HANDLER(WM_SETFOCUS, OnSetFocus) |
| 44 MSG_WM_DESTROY(OnDestroy) | |
| 45 END_MSG_MAP() | 44 END_MSG_MAP() |
| 46 | 45 |
| 47 DECLARE_WND_CLASS(chrome::kExternalTabWindowClass) | 46 DECLARE_WND_CLASS(chrome::kExternalTabWindowClass) |
| 48 | 47 |
| 49 ExternalTabContainer(AutomationProvider* automation); | 48 ExternalTabContainer(AutomationProvider* automation); |
| 50 ~ExternalTabContainer(); | 49 ~ExternalTabContainer(); |
| 51 | 50 |
| 52 TabContents* tab_contents() const { | 51 TabContents* tab_contents() const { |
| 53 return tab_contents_; | 52 return tab_contents_; |
| 54 } | 53 } |
| 55 | 54 |
| 56 bool Init(Profile* profile, HWND parent, const gfx::Rect& dimensions, | 55 bool Init(Profile* profile, HWND parent, const gfx::Rect& dimensions, |
| 57 unsigned int style); | 56 unsigned int style); |
| 58 | 57 |
| 58 // This function gets called from two places, which is fine. |
| 59 // 1. OnFinalMessage |
| 60 // 2. In the destructor. |
| 61 bool Uninitialize(HWND window); |
| 62 |
| 59 // Overridden from TabContentsDelegate: | 63 // Overridden from TabContentsDelegate: |
| 60 virtual void OpenURLFromTab(TabContents* source, | 64 virtual void OpenURLFromTab(TabContents* source, |
| 61 const GURL& url, | 65 const GURL& url, |
| 62 const GURL& referrer, | 66 const GURL& referrer, |
| 63 WindowOpenDisposition disposition, | 67 WindowOpenDisposition disposition, |
| 64 PageTransition::Type transition); | 68 PageTransition::Type transition); |
| 65 virtual void NavigationStateChanged(const TabContents* source, | 69 virtual void NavigationStateChanged(const TabContents* source, |
| 66 unsigned changed_flags); | 70 unsigned changed_flags); |
| 67 virtual void ReplaceContents(TabContents* source, TabContents* new_contents); | 71 virtual void ReplaceContents(TabContents* source, TabContents* new_contents); |
| 68 virtual void AddNewContents(TabContents* source, | 72 virtual void AddNewContents(TabContents* source, |
| (...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 151 // A failed navigation like a 404 is followed in chrome with a success | 155 // A failed navigation like a 404 is followed in chrome with a success |
| 152 // navigation for the 404 page. We need to ignore the next navigation | 156 // navigation for the 404 page. We need to ignore the next navigation |
| 153 // to avoid confusing the clients of the external tab. This member variable | 157 // to avoid confusing the clients of the external tab. This member variable |
| 154 // is set when we need to ignore the next load notification. | 158 // is set when we need to ignore the next load notification. |
| 155 bool ignore_next_load_notification_; | 159 bool ignore_next_load_notification_; |
| 156 | 160 |
| 157 DISALLOW_COPY_AND_ASSIGN(ExternalTabContainer); | 161 DISALLOW_COPY_AND_ASSIGN(ExternalTabContainer); |
| 158 }; | 162 }; |
| 159 | 163 |
| 160 #endif // CHROME_BROWSER_EXTERNAL_TAB_CONTAINER_H__ | 164 #endif // CHROME_BROWSER_EXTERNAL_TAB_CONTAINER_H__ |
| OLD | NEW |