| 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 <string> | 9 #include <string> |
| 10 #include <vector> | |
| 11 | 10 |
| 12 #include "base/basictypes.h" | 11 #include "base/basictypes.h" |
| 13 #include "chrome/browser/automation/automation_resource_routing_delegate.h" | 12 #include "chrome/browser/automation/automation_resource_routing_delegate.h" |
| 14 #include "chrome/common/content_settings_types.h" | 13 #include "chrome/common/content_settings_types.h" |
| 15 #include "chrome/common/instant_types.h" | 14 #include "chrome/common/instant_types.h" |
| 16 #include "content/browser/tab_contents/navigation_entry.h" | 15 #include "content/browser/tab_contents/navigation_entry.h" |
| 17 #include "content/common/navigation_types.h" | 16 #include "content/common/navigation_types.h" |
| 18 #include "content/common/page_transition_types.h" | 17 #include "content/common/page_transition_types.h" |
| 19 #include "ui/gfx/native_widget_types.h" | 18 #include "ui/gfx/native_widget_types.h" |
| 20 #include "webkit/glue/window_open_disposition.h" | 19 #include "webkit/glue/window_open_disposition.h" |
| (...skipping 285 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 306 // Whether the renderer should report its preferred size when it changes by | 305 // Whether the renderer should report its preferred size when it changes by |
| 307 // calling UpdatePreferredSize(). | 306 // calling UpdatePreferredSize(). |
| 308 // Note that this is set when the RenderViewHost is created and cannot be | 307 // Note that this is set when the RenderViewHost is created and cannot be |
| 309 // changed after that. | 308 // changed after that. |
| 310 virtual bool ShouldEnablePreferredSizeNotifications(); | 309 virtual bool ShouldEnablePreferredSizeNotifications(); |
| 311 | 310 |
| 312 // Notification that the preferred size of the contents has changed. | 311 // Notification that the preferred size of the contents has changed. |
| 313 // Only called if ShouldEnablePreferredSizeNotifications() returns true. | 312 // Only called if ShouldEnablePreferredSizeNotifications() returns true. |
| 314 virtual void UpdatePreferredSize(const gfx::Size& pref_size); | 313 virtual void UpdatePreferredSize(const gfx::Size& pref_size); |
| 315 | 314 |
| 316 // Notifies the delegate that the page has a suggest result. | |
| 317 virtual void OnSetSuggestions(int32 page_id, | |
| 318 const std::vector<std::string>& result, | |
| 319 InstantCompleteBehavior behavior); | |
| 320 | |
| 321 // Notifies the delegate whether the page supports instant-style interaction. | |
| 322 virtual void OnInstantSupportDetermined(int32 page_id, bool result); | |
| 323 | |
| 324 // Notifies the delegate that the content restrictions for this tab has | 315 // Notifies the delegate that the content restrictions for this tab has |
| 325 // changed. | 316 // changed. |
| 326 virtual void ContentRestrictionsChanged(TabContents* source); | 317 virtual void ContentRestrictionsChanged(TabContents* source); |
| 327 | 318 |
| 328 // Returns true if the hung renderer dialog should be shown. Default is true. | 319 // Returns true if the hung renderer dialog should be shown. Default is true. |
| 329 virtual bool ShouldShowHungRendererDialog(); | 320 virtual bool ShouldShowHungRendererDialog(); |
| 330 | 321 |
| 331 // Notification that a worker associated with this tab has crashed. | 322 // Notification that a worker associated with this tab has crashed. |
| 332 virtual void WorkerCrashed(); | 323 virtual void WorkerCrashed(); |
| 333 | 324 |
| 334 protected: | 325 protected: |
| 335 virtual ~TabContentsDelegate(); | 326 virtual ~TabContentsDelegate(); |
| 336 }; | 327 }; |
| 337 | 328 |
| 338 #endif // CONTENT_BROWSER_TAB_CONTENTS_TAB_CONTENTS_DELEGATE_H_ | 329 #endif // CONTENT_BROWSER_TAB_CONTENTS_TAB_CONTENTS_DELEGATE_H_ |
| OLD | NEW |