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 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
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 |
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 std::wstring& 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 so each platform can |
70 // prepare the sad tab. | 70 // prepare the sad tab. |
71 virtual void OnTabCrashed(base::TerminationStatus status, | 71 virtual void OnTabCrashed(base::TerminationStatus status, |
72 int error_code) = 0; | 72 int error_code) = 0; |
73 | 73 |
74 // TODO(brettw) this is a hack. It's used in two places at the time of this | 74 // 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 | 75 // 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 | 76 // one to be correct, since it wouldn't have known about sizes that happened |
77 // while it was hidden; (2) in constrained windows. | 77 // while it was hidden; (2) in constrained windows. |
(...skipping 40 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 |