| 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 // DOMView is a ChromeView that displays the content of a web DOM. | 5 // DOMView is a ChromeView that displays the content of a web DOM. |
| 6 // It should be used with data: URLs. | 6 // It should be used with data: URLs. |
| 7 | 7 |
| 8 #ifndef CHROME_BROWSER_UI_VIEWS_DOM_VIEW_H_ | 8 #ifndef CHROME_BROWSER_UI_VIEWS_DOM_VIEW_H_ |
| 9 #define CHROME_BROWSER_UI_VIEWS_DOM_VIEW_H_ | 9 #define CHROME_BROWSER_UI_VIEWS_DOM_VIEW_H_ |
| 10 #pragma once | 10 #pragma once |
| (...skipping 25 matching lines...) Expand all Loading... |
| 36 // The tab contents displaying the actual contents. | 36 // The tab contents displaying the actual contents. |
| 37 TabContents* tab_contents() const { return tab_contents_.get(); } | 37 TabContents* tab_contents() const { return tab_contents_.get(); } |
| 38 | 38 |
| 39 protected: | 39 protected: |
| 40 // Overridden from View. | 40 // Overridden from View. |
| 41 virtual bool SkipDefaultKeyEventProcessing(const views::KeyEvent& e); | 41 virtual bool SkipDefaultKeyEventProcessing(const views::KeyEvent& e); |
| 42 virtual void Focus(); | 42 virtual void Focus(); |
| 43 virtual void ViewHierarchyChanged(bool is_add, views::View* parent, | 43 virtual void ViewHierarchyChanged(bool is_add, views::View* parent, |
| 44 views::View* child); | 44 views::View* child); |
| 45 | 45 |
| 46 // AttachTabContents calls Attach to hook up the NativeViewHost. This is |
| 47 // here because depending on whether this is a touch build or not the |
| 48 // implementation varies slightly, while Detach is the same in both cases. |
| 49 void AttachTabContents(); |
| 50 |
| 46 // Returns new allocated TabContents instance, caller is responsible deleting. | 51 // Returns new allocated TabContents instance, caller is responsible deleting. |
| 47 // Override in derived classes to replace TabContents with derivative. | 52 // Override in derived classes to replace TabContents with derivative. |
| 48 virtual TabContents* CreateTabContents(Profile* profile, | 53 virtual TabContents* CreateTabContents(Profile* profile, |
| 49 SiteInstance* instance); | 54 SiteInstance* instance); |
| 50 | 55 |
| 51 scoped_ptr<TabContents> tab_contents_; | 56 scoped_ptr<TabContents> tab_contents_; |
| 52 | 57 |
| 53 private: | 58 private: |
| 54 bool initialized_; | 59 bool initialized_; |
| 55 | 60 |
| 56 DISALLOW_COPY_AND_ASSIGN(DOMView); | 61 DISALLOW_COPY_AND_ASSIGN(DOMView); |
| 57 }; | 62 }; |
| 58 | 63 |
| 59 #endif // CHROME_BROWSER_UI_VIEWS_DOM_VIEW_H_ | 64 #endif // CHROME_BROWSER_UI_VIEWS_DOM_VIEW_H_ |
| OLD | NEW |