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_DELEGATE_H_ | 5 #ifndef CONTENT_BROWSER_TAB_CONTENTS_TAB_CONTENTS_DELEGATE_H_ |
6 #define CONTENT_BROWSER_TAB_CONTENTS_TAB_CONTENTS_DELEGATE_H_ | 6 #define CONTENT_BROWSER_TAB_CONTENTS_TAB_CONTENTS_DELEGATE_H_ |
7 #pragma once | 7 #pragma once |
8 | 8 |
9 #include <set> | 9 #include <set> |
10 #include <string> | 10 #include <string> |
(...skipping 114 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
125 // or a panel window. | 125 // or a panel window. |
126 virtual bool IsPopupOrPanel(const TabContents* source) const; | 126 virtual bool IsPopupOrPanel(const TabContents* source) const; |
127 | 127 |
128 // Returns true if constrained windows should be focused. Default is true. | 128 // Returns true if constrained windows should be focused. Default is true. |
129 virtual bool ShouldFocusConstrainedWindow(); | 129 virtual bool ShouldFocusConstrainedWindow(); |
130 | 130 |
131 // Invoked prior to the TabContents showing a constrained window. | 131 // Invoked prior to the TabContents showing a constrained window. |
132 virtual void WillShowConstrainedWindow(TabContents* source); | 132 virtual void WillShowConstrainedWindow(TabContents* source); |
133 | 133 |
134 // Notification that the target URL has changed. | 134 // Notification that the target URL has changed. |
135 virtual void UpdateTargetURL(TabContents* source, const GURL& url); | 135 virtual void UpdateTargetURL(TabContents* source, int32 page_id, |
| 136 const GURL& url); |
136 | 137 |
137 // Notification that there was a mouse event, along with the absolute | 138 // Notification that there was a mouse event, along with the absolute |
138 // coordinates of the mouse pointer and whether it was a normal motion event | 139 // coordinates of the mouse pointer and whether it was a normal motion event |
139 // (otherwise, the pointer left the contents area). | 140 // (otherwise, the pointer left the contents area). |
140 virtual void ContentsMouseEvent( | 141 virtual void ContentsMouseEvent( |
141 TabContents* source, const gfx::Point& location, bool motion); | 142 TabContents* source, const gfx::Point& location, bool motion); |
142 | 143 |
143 // Request the delegate to change the zoom level of the current tab. | 144 // Request the delegate to change the zoom level of the current tab. |
144 virtual void ContentsZoomChange(bool zoom_in); | 145 virtual void ContentsZoomChange(bool zoom_in); |
145 | 146 |
(...skipping 195 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
341 // Result of string search in the page. This includes the number of matches | 342 // Result of string search in the page. This includes the number of matches |
342 // found and the selection rect (in screen coordinates) for the string found. | 343 // found and the selection rect (in screen coordinates) for the string found. |
343 // If |final_update| is false, it indicates that more results follow. | 344 // If |final_update| is false, it indicates that more results follow. |
344 virtual void FindReply(TabContents* tab, | 345 virtual void FindReply(TabContents* tab, |
345 int request_id, | 346 int request_id, |
346 int number_of_matches, | 347 int number_of_matches, |
347 const gfx::Rect& selection_rect, | 348 const gfx::Rect& selection_rect, |
348 int active_match_ordinal, | 349 int active_match_ordinal, |
349 bool final_update); | 350 bool final_update); |
350 | 351 |
| 352 // Notification that a plugin has crashed. |
| 353 virtual void CrashedPlugin(TabContents* tab, const FilePath& plugin_path); |
| 354 |
351 protected: | 355 protected: |
352 virtual ~TabContentsDelegate(); | 356 virtual ~TabContentsDelegate(); |
353 | 357 |
354 private: | 358 private: |
355 friend class TabContents; | 359 friend class TabContents; |
356 | 360 |
357 // Called when |this| becomes the TabContentsDelegate for |source|. | 361 // Called when |this| becomes the TabContentsDelegate for |source|. |
358 void Attach(TabContents* source); | 362 void Attach(TabContents* source); |
359 | 363 |
360 // Called when |this| is no longer the TabContentsDelegate for |source|. | 364 // Called when |this| is no longer the TabContentsDelegate for |source|. |
361 void Detach(TabContents* source); | 365 void Detach(TabContents* source); |
362 | 366 |
363 // The TabContents that this is currently a delegate for. | 367 // The TabContents that this is currently a delegate for. |
364 std::set<TabContents*> attached_contents_; | 368 std::set<TabContents*> attached_contents_; |
365 }; | 369 }; |
366 | 370 |
367 #endif // CONTENT_BROWSER_TAB_CONTENTS_TAB_CONTENTS_DELEGATE_H_ | 371 #endif // CONTENT_BROWSER_TAB_CONTENTS_TAB_CONTENTS_DELEGATE_H_ |
OLD | NEW |