| 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 |
| 355 // Sent when the renderer starts a provisional load for a frame. |
| 356 virtual void DidStartProvisionalLoadForFrame(TabContents* tab, |
| 357 int64 frame_id, |
| 358 bool is_main_frame, |
| 359 bool has_opener_set, |
| 360 const GURL& url); |
| 351 protected: | 361 protected: |
| 352 virtual ~TabContentsDelegate(); | 362 virtual ~TabContentsDelegate(); |
| 353 | 363 |
| 354 private: | 364 private: |
| 355 friend class TabContents; | 365 friend class TabContents; |
| 356 | 366 |
| 357 // Called when |this| becomes the TabContentsDelegate for |source|. | 367 // Called when |this| becomes the TabContentsDelegate for |source|. |
| 358 void Attach(TabContents* source); | 368 void Attach(TabContents* source); |
| 359 | 369 |
| 360 // Called when |this| is no longer the TabContentsDelegate for |source|. | 370 // Called when |this| is no longer the TabContentsDelegate for |source|. |
| 361 void Detach(TabContents* source); | 371 void Detach(TabContents* source); |
| 362 | 372 |
| 363 // The TabContents that this is currently a delegate for. | 373 // The TabContents that this is currently a delegate for. |
| 364 std::set<TabContents*> attached_contents_; | 374 std::set<TabContents*> attached_contents_; |
| 365 }; | 375 }; |
| 366 | 376 |
| 367 #endif // CONTENT_BROWSER_TAB_CONTENTS_TAB_CONTENTS_DELEGATE_H_ | 377 #endif // CONTENT_BROWSER_TAB_CONTENTS_TAB_CONTENTS_DELEGATE_H_ |
| OLD | NEW |