| OLD | NEW |
| 1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2006-2008 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 CHROME_BROWSER_TAB_CONTENTS_TAB_CONTENTS_DELEGATE_H_ | 5 #ifndef CHROME_BROWSER_TAB_CONTENTS_TAB_CONTENTS_DELEGATE_H_ |
| 6 #define CHROME_BROWSER_TAB_CONTENTS_TAB_CONTENTS_DELEGATE_H_ | 6 #define CHROME_BROWSER_TAB_CONTENTS_TAB_CONTENTS_DELEGATE_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 | 9 |
| 10 #include "app/gfx/native_widget_types.h" | 10 #include "app/gfx/native_widget_types.h" |
| (...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 87 return source; | 87 return source; |
| 88 } | 88 } |
| 89 | 89 |
| 90 // Notification that some of our content has changed size as | 90 // Notification that some of our content has changed size as |
| 91 // part of an animation. | 91 // part of an animation. |
| 92 virtual void ToolbarSizeChanged(TabContents* source, bool is_animating) = 0; | 92 virtual void ToolbarSizeChanged(TabContents* source, bool is_animating) = 0; |
| 93 | 93 |
| 94 // Notification that the starredness of the current URL changed. | 94 // Notification that the starredness of the current URL changed. |
| 95 virtual void URLStarredChanged(TabContents* source, bool starred) = 0; | 95 virtual void URLStarredChanged(TabContents* source, bool starred) = 0; |
| 96 | 96 |
| 97 // Notification that the target URL has changed | 97 // Notification that the target URL has changed. |
| 98 virtual void UpdateTargetURL(TabContents* source, const GURL& url) = 0; | 98 virtual void UpdateTargetURL(TabContents* source, const GURL& url) = 0; |
| 99 | 99 |
| 100 // Notification that there was a mouse event | 100 // Notification that there was a mouse event, along with the absolute |
| 101 virtual void ContentsMouseEvent(TabContents* source, bool motion) { } | 101 // coordinates of the mouse pointer and whether it was a normal motion event |
| 102 // (otherwise, the pointer left the contents area). |
| 103 virtual void ContentsMouseEvent( |
| 104 TabContents* source, const gfx::Point& location, bool motion) { } |
| 102 | 105 |
| 103 // Request the delegate to change the zoom level of the current tab. | 106 // Request the delegate to change the zoom level of the current tab. |
| 104 virtual void ContentsZoomChange(bool zoom_in) { } | 107 virtual void ContentsZoomChange(bool zoom_in) { } |
| 105 | 108 |
| 106 // Check whether this contents is inside a window dedicated to running a web | 109 // Check whether this contents is inside a window dedicated to running a web |
| 107 // application. | 110 // application. |
| 108 virtual bool IsApplication() const { return false; } | 111 virtual bool IsApplication() const { return false; } |
| 109 | 112 |
| 110 // Detach the given tab and convert it to a "webapp" view. The tab must be | 113 // Detach the given tab and convert it to a "webapp" view. The tab must be |
| 111 // a TabContents with a valid WebApp set. | 114 // a TabContents with a valid WebApp set. |
| (...skipping 130 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 242 } | 245 } |
| 243 | 246 |
| 244 // Returns whether this tab contents should add navigations to history. | 247 // Returns whether this tab contents should add navigations to history. |
| 245 virtual bool ShouldAddNavigationsToHistory() const { return true; } | 248 virtual bool ShouldAddNavigationsToHistory() const { return true; } |
| 246 | 249 |
| 247 protected: | 250 protected: |
| 248 ~TabContentsDelegate() {} | 251 ~TabContentsDelegate() {} |
| 249 }; | 252 }; |
| 250 | 253 |
| 251 #endif // CHROME_BROWSER_TAB_CONTENTS_TAB_CONTENTS_DELEGATE_H_ | 254 #endif // CHROME_BROWSER_TAB_CONTENTS_TAB_CONTENTS_DELEGATE_H_ |
| OLD | NEW |