| 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 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 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 |
| 63 // Sets the page title for the native widgets corresponding to the view. This | 63 // Sets the page title for the native widgets corresponding to the view. This |
| 64 // is not strictly necessary and isn't expected to be displayed anywhere, but | 64 // is not strictly necessary and isn't expected to be displayed anywhere, but |
| 65 // can aid certain debugging tools such as Spy++ on Windows where you are | 65 // can aid certain debugging tools such as Spy++ on Windows where you are |
| 66 // trying to find a specific window. | 66 // trying to find a specific window. |
| 67 virtual void SetPageTitle(const string16& title) = 0; | 67 virtual void SetPageTitle(const string16& title) = 0; |
| 68 | 68 |
| 69 // Used to notify the view that a tab has crashed so each platform can | 69 // Used to notify the view that a tab has crashed. |
| 70 // prepare the sad tab. | |
| 71 virtual void OnTabCrashed(base::TerminationStatus status, | 70 virtual void OnTabCrashed(base::TerminationStatus status, |
| 72 int error_code) = 0; | 71 int error_code) = 0; |
| 73 | 72 |
| 74 // TODO(brettw) this is a hack. It's used in two places at the time of this | 73 // TODO(brettw) this is a hack. It's used in two places at the time of this |
| 75 // writing: (1) when render view hosts switch, we need to size the replaced | 74 // writing: (1) when render view hosts switch, we need to size the replaced |
| 76 // one to be correct, since it wouldn't have known about sizes that happened | 75 // one to be correct, since it wouldn't have known about sizes that happened |
| 77 // while it was hidden; (2) in constrained windows. | 76 // while it was hidden; (2) in constrained windows. |
| 78 // | 77 // |
| 79 // (1) will be fixed once interstitials are cleaned up. (2) seems like it | 78 // (1) will be fixed once interstitials are cleaned up. (2) seems like it |
| 80 // should be cleaned up or done some other way, since this works for normal | 79 // should be cleaned up or done some other way, since this works for normal |
| (...skipping 29 matching lines...) Expand all Loading... |
| 110 // TabContents::Close() calls IsEventTracking(), and if it returns | 109 // TabContents::Close() calls IsEventTracking(), and if it returns |
| 111 // true CloseTabAfterEventTracking() is called and the close is not | 110 // true CloseTabAfterEventTracking() is called and the close is not |
| 112 // completed. | 111 // completed. |
| 113 virtual bool IsEventTracking() const = 0; | 112 virtual bool IsEventTracking() const = 0; |
| 114 virtual void CloseTabAfterEventTracking() = 0; | 113 virtual void CloseTabAfterEventTracking() = 0; |
| 115 | 114 |
| 116 // Get the bounds of the View, relative to the parent. | 115 // Get the bounds of the View, relative to the parent. |
| 117 // TODO(beng): Return a rect rather than using an out param. | 116 // TODO(beng): Return a rect rather than using an out param. |
| 118 virtual void GetViewBounds(gfx::Rect* out) const = 0; | 117 virtual void GetViewBounds(gfx::Rect* out) const = 0; |
| 119 | 118 |
| 119 // --------------------------------------------------------------------------- |
| 120 // Functions for embedders. |
| 121 // TODO(avi): Figure out where these go on the API surface. |
| 122 |
| 123 // Installs a native view to cover the visible web contents. Removed by |
| 124 // |RemoveOverlayView|. |
| 125 virtual void InstallOverlayView(gfx::NativeView view) = 0; |
| 126 |
| 127 // Removes the native overlay view installed by |InstallOverlayView|. |
| 128 virtual void RemoveOverlayView() = 0; |
| 129 |
| 120 protected: | 130 protected: |
| 121 TabContentsView(); // Abstract interface. | 131 TabContentsView(); // Abstract interface. |
| 122 | 132 |
| 123 private: | 133 private: |
| 124 DISALLOW_COPY_AND_ASSIGN(TabContentsView); | 134 DISALLOW_COPY_AND_ASSIGN(TabContentsView); |
| 125 }; | 135 }; |
| 126 | 136 |
| 127 #endif // CONTENT_BROWSER_TAB_CONTENTS_TAB_CONTENTS_VIEW_H_ | 137 #endif // CONTENT_BROWSER_TAB_CONTENTS_TAB_CONTENTS_VIEW_H_ |
| OLD | NEW |