| 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 "base/basictypes.h" | 8 #include "base/basictypes.h" |
| 9 #include "base/gfx/native_widget_types.h" | 9 #include "base/gfx/native_widget_types.h" |
| 10 #include "base/gfx/rect.h" | 10 #include "base/gfx/rect.h" |
| 11 #include "chrome/common/page_transition_types.h" | 11 #include "chrome/common/page_transition_types.h" |
| 12 #include "chrome/common/page_zoom.h" |
| 12 #include "chrome/common/renderer_preferences.h" | 13 #include "chrome/common/renderer_preferences.h" |
| 13 #include "webkit/glue/context_menu.h" | 14 #include "webkit/glue/context_menu.h" |
| 14 #include "webkit/glue/window_open_disposition.h" | 15 #include "webkit/glue/window_open_disposition.h" |
| 15 | 16 |
| 16 class DownloadItem; | 17 class DownloadItem; |
| 17 class ExtensionFunctionDispatcher; | 18 class ExtensionFunctionDispatcher; |
| 18 class GURL; | 19 class GURL; |
| 19 class HtmlDialogUIDelegate; | 20 class HtmlDialogUIDelegate; |
| 20 class Profile; | 21 class Profile; |
| 21 class RenderViewHost; | 22 class RenderViewHost; |
| (...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 91 // Notification that the starredness of the current URL changed. | 92 // Notification that the starredness of the current URL changed. |
| 92 virtual void URLStarredChanged(TabContents* source, bool starred) = 0; | 93 virtual void URLStarredChanged(TabContents* source, bool starred) = 0; |
| 93 | 94 |
| 94 // Notification that the target URL has changed | 95 // Notification that the target URL has changed |
| 95 virtual void UpdateTargetURL(TabContents* source, const GURL& url) = 0; | 96 virtual void UpdateTargetURL(TabContents* source, const GURL& url) = 0; |
| 96 | 97 |
| 97 // Notification that there was a mouse event | 98 // Notification that there was a mouse event |
| 98 virtual void ContentsMouseEvent(TabContents* source, bool motion) { } | 99 virtual void ContentsMouseEvent(TabContents* source, bool motion) { } |
| 99 | 100 |
| 100 // Request the delegate to change the zoom level of the current tab. | 101 // Request the delegate to change the zoom level of the current tab. |
| 101 virtual void ContentsZoomChange(bool zoom_in) { } | 102 virtual void ContentsZoomChange(PageZoom::Function zoom_type) { } |
| 102 | 103 |
| 103 // Check whether this contents is inside a window dedicated to running a web | 104 // Check whether this contents is inside a window dedicated to running a web |
| 104 // application. | 105 // application. |
| 105 virtual bool IsApplication() { return false; } | 106 virtual bool IsApplication() { return false; } |
| 106 | 107 |
| 107 // Detach the given tab and convert it to a "webapp" view. The tab must be | 108 // Detach the given tab and convert it to a "webapp" view. The tab must be |
| 108 // a TabContents with a valid WebApp set. | 109 // a TabContents with a valid WebApp set. |
| 109 virtual void ConvertContentsToApplication(TabContents* source) { } | 110 virtual void ConvertContentsToApplication(TabContents* source) { } |
| 110 | 111 |
| 111 // Return whether this tab contents should have a URL bar. Only web contents | 112 // Return whether this tab contents should have a URL bar. Only web contents |
| (...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 201 | 202 |
| 202 // Shows a confirmation UI that the specified |template_url| is to be added as | 203 // Shows a confirmation UI that the specified |template_url| is to be added as |
| 203 // a search engine. | 204 // a search engine. |
| 204 virtual void ConfirmAddSearchProvider(const TemplateURL* template_url, | 205 virtual void ConfirmAddSearchProvider(const TemplateURL* template_url, |
| 205 Profile* profile) { | 206 Profile* profile) { |
| 206 } | 207 } |
| 207 | 208 |
| 208 protected: | 209 protected: |
| 209 ~TabContentsDelegate() {} | 210 ~TabContentsDelegate() {} |
| 210 RendererPreferences renderer_preferences_; | 211 RendererPreferences renderer_preferences_; |
| 211 | |
| 212 }; | 212 }; |
| 213 | 213 |
| 214 #endif // CHROME_BROWSER_TAB_CONTENTS_TAB_CONTENTS_DELEGATE_H_ | 214 #endif // CHROME_BROWSER_TAB_CONTENTS_TAB_CONTENTS_DELEGATE_H_ |
| OLD | NEW |