| 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 296 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 307 // Request to enumerate a directory. This is equivalent to running the file | 307 // Request to enumerate a directory. This is equivalent to running the file |
| 308 // chooser in directory-enumeration mode and having the user select the given | 308 // chooser in directory-enumeration mode and having the user select the given |
| 309 // directory. | 309 // directory. |
| 310 virtual void EnumerateDirectory(TabContents* tab, int request_id, | 310 virtual void EnumerateDirectory(TabContents* tab, int request_id, |
| 311 const FilePath& path); | 311 const FilePath& path); |
| 312 | 312 |
| 313 // Called when the renderer puts a tab into or out of fullscreen mode. | 313 // Called when the renderer puts a tab into or out of fullscreen mode. |
| 314 virtual void ToggleFullscreenModeForTab(TabContents* tab, | 314 virtual void ToggleFullscreenModeForTab(TabContents* tab, |
| 315 bool enter_fullscreen); | 315 bool enter_fullscreen); |
| 316 | 316 |
| 317 // Called when a Javascript out of memory notification is received. |
| 318 virtual void JSOutOfMemory(TabContents* tab); |
| 319 |
| 320 // Register a new handler for URL requests with the given scheme. |
| 321 virtual void RegisterProtocolHandler(TabContents* tab, |
| 322 const std::string& protocol, |
| 323 const GURL& url, |
| 324 const string16& title); |
| 325 |
| 326 // Register a new handler for Intents with the given action and type filter. |
| 327 virtual void RegisterIntentHandler(TabContents* tab, |
| 328 const string16& action, |
| 329 const string16& type, |
| 330 const string16& href, |
| 331 const string16& title); |
| 332 |
| 333 // WebIntent notification handler. |
| 334 virtual void WebIntentDispatch(TabContents* tab, |
| 335 int routing_id, |
| 336 const string16& action, |
| 337 const string16& type, |
| 338 const string16& data, |
| 339 int intent_id); |
| 340 |
| 317 protected: | 341 protected: |
| 318 virtual ~TabContentsDelegate(); | 342 virtual ~TabContentsDelegate(); |
| 319 | 343 |
| 320 private: | 344 private: |
| 321 friend class TabContents; | 345 friend class TabContents; |
| 322 | 346 |
| 323 // Called when |this| becomes the TabContentsDelegate for |source|. | 347 // Called when |this| becomes the TabContentsDelegate for |source|. |
| 324 void Attach(TabContents* source); | 348 void Attach(TabContents* source); |
| 325 | 349 |
| 326 // Called when |this| is no longer the TabContentsDelegate for |source|. | 350 // Called when |this| is no longer the TabContentsDelegate for |source|. |
| 327 void Detach(TabContents* source); | 351 void Detach(TabContents* source); |
| 328 | 352 |
| 329 // The TabContents that this is currently a delegate for. | 353 // The TabContents that this is currently a delegate for. |
| 330 std::set<TabContents*> attached_contents_; | 354 std::set<TabContents*> attached_contents_; |
| 331 }; | 355 }; |
| 332 | 356 |
| 333 #endif // CONTENT_BROWSER_TAB_CONTENTS_TAB_CONTENTS_DELEGATE_H_ | 357 #endif // CONTENT_BROWSER_TAB_CONTENTS_TAB_CONTENTS_DELEGATE_H_ |
| OLD | NEW |