Chromium Code Reviews| 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 #ifndef CONTENT_BROWSER_TAB_CONTENTS_TAB_CONTENTS_VIEW_H_ | 5 #ifndef CONTENT_BROWSER_TAB_CONTENTS_TAB_CONTENTS_VIEW_H_ |
| 6 #define CONTENT_BROWSER_TAB_CONTENTS_TAB_CONTENTS_VIEW_H_ | 6 #define CONTENT_BROWSER_TAB_CONTENTS_TAB_CONTENTS_VIEW_H_ |
| 7 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include <string> | 9 #include <string> |
| 10 | 10 |
| (...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 42 // Returns the native widget with the main content of the tab (i.e. the main | 42 // Returns the native widget with the main content of the tab (i.e. the main |
| 43 // render view host, though there may be many popups in the tab as children of | 43 // render view host, though there may be many popups in the tab as children of |
| 44 // the container). | 44 // the container). |
| 45 virtual gfx::NativeView GetContentNativeView() const = 0; | 45 virtual gfx::NativeView GetContentNativeView() const = 0; |
| 46 | 46 |
| 47 // Returns the outermost native view. This will be used as the parent for | 47 // Returns the outermost native view. This will be used as the parent for |
| 48 // dialog boxes. | 48 // dialog boxes. |
| 49 virtual gfx::NativeWindow GetTopLevelNativeWindow() const = 0; | 49 virtual gfx::NativeWindow GetTopLevelNativeWindow() const = 0; |
| 50 | 50 |
| 51 // Computes the rectangle for the native widget that contains the contents of | 51 // Computes the rectangle for the native widget that contains the contents of |
| 52 // the tab relative to its parent. | 52 // the tab in the screen coordinate system. |
|
Avi (use Gerrit)
2011/11/14 21:27:14
Nice clarification.
| |
| 53 virtual void GetContainerBounds(gfx::Rect *out) const = 0; | 53 virtual void GetContainerBounds(gfx::Rect *out) const = 0; |
| 54 | 54 |
| 55 // Helper function for GetContainerBounds. Most callers just want to know the | 55 // Helper function for GetContainerBounds. Most callers just want to know the |
| 56 // size, and this makes it more clear. | 56 // size, and this makes it more clear. |
| 57 gfx::Size GetContainerSize() const { | 57 gfx::Size GetContainerSize() const { |
| 58 gfx::Rect rc; | 58 gfx::Rect rc; |
| 59 GetContainerBounds(&rc); | 59 GetContainerBounds(&rc); |
| 60 return gfx::Size(rc.width(), rc.height()); | 60 return gfx::Size(rc.width(), rc.height()); |
| 61 } | 61 } |
| 62 | 62 |
| (...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 118 virtual void GetViewBounds(gfx::Rect* out) const = 0; | 118 virtual void GetViewBounds(gfx::Rect* out) const = 0; |
| 119 | 119 |
| 120 protected: | 120 protected: |
| 121 TabContentsView(); // Abstract interface. | 121 TabContentsView(); // Abstract interface. |
| 122 | 122 |
| 123 private: | 123 private: |
| 124 DISALLOW_COPY_AND_ASSIGN(TabContentsView); | 124 DISALLOW_COPY_AND_ASSIGN(TabContentsView); |
| 125 }; | 125 }; |
| 126 | 126 |
| 127 #endif // CONTENT_BROWSER_TAB_CONTENTS_TAB_CONTENTS_VIEW_H_ | 127 #endif // CONTENT_BROWSER_TAB_CONTENTS_TAB_CONTENTS_VIEW_H_ |
| OLD | NEW |