| 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> |
| 11 | 11 |
| 12 #include "base/basictypes.h" | 12 #include "base/basictypes.h" |
| 13 #include "content/browser/tab_contents/navigation_entry.h" | 13 #include "content/browser/tab_contents/navigation_entry.h" |
| 14 #include "content/common/content_export.h" |
| 14 #include "content/common/navigation_types.h" | 15 #include "content/common/navigation_types.h" |
| 15 #include "content/common/page_transition_types.h" | 16 #include "content/common/page_transition_types.h" |
| 16 #include "ui/gfx/native_widget_types.h" | 17 #include "ui/gfx/native_widget_types.h" |
| 17 #include "webkit/glue/window_open_disposition.h" | 18 #include "webkit/glue/window_open_disposition.h" |
| 18 | 19 |
| 19 namespace content { | 20 namespace content { |
| 20 class BrowserContext; | 21 class BrowserContext; |
| 21 class JavaScriptDialogCreator; | 22 class JavaScriptDialogCreator; |
| 22 } | 23 } |
| 23 | 24 |
| (...skipping 13 matching lines...) Expand all Loading... |
| 37 class GURL; | 38 class GURL; |
| 38 class HtmlDialogUIDelegate; | 39 class HtmlDialogUIDelegate; |
| 39 struct NativeWebKeyboardEvent; | 40 struct NativeWebKeyboardEvent; |
| 40 class RenderViewHost; | 41 class RenderViewHost; |
| 41 class TabContents; | 42 class TabContents; |
| 42 struct ViewHostMsg_RunFileChooser_Params; | 43 struct ViewHostMsg_RunFileChooser_Params; |
| 43 class FilePath; | 44 class FilePath; |
| 44 | 45 |
| 45 // Objects implement this interface to get notified about changes in the | 46 // Objects implement this interface to get notified about changes in the |
| 46 // TabContents and to provide necessary functionality. | 47 // TabContents and to provide necessary functionality. |
| 47 class TabContentsDelegate { | 48 class CONTENT_EXPORT TabContentsDelegate { |
| 48 public: | 49 public: |
| 49 TabContentsDelegate(); | 50 TabContentsDelegate(); |
| 50 | 51 |
| 51 // Opens a new URL inside the passed in TabContents (if source is 0 open | 52 // Opens a new URL inside the passed in TabContents (if source is 0 open |
| 52 // in the current front-most tab), unless |disposition| indicates the url | 53 // in the current front-most tab), unless |disposition| indicates the url |
| 53 // should be opened in a new tab or window. | 54 // should be opened in a new tab or window. |
| 54 // | 55 // |
| 55 // A NULL source indicates the current tab (callers should probably use | 56 // A NULL source indicates the current tab (callers should probably use |
| 56 // OpenURL() for these cases which does it for you). | 57 // OpenURL() for these cases which does it for you). |
| 57 | 58 |
| (...skipping 300 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 358 void Attach(TabContents* source); | 359 void Attach(TabContents* source); |
| 359 | 360 |
| 360 // Called when |this| is no longer the TabContentsDelegate for |source|. | 361 // Called when |this| is no longer the TabContentsDelegate for |source|. |
| 361 void Detach(TabContents* source); | 362 void Detach(TabContents* source); |
| 362 | 363 |
| 363 // The TabContents that this is currently a delegate for. | 364 // The TabContents that this is currently a delegate for. |
| 364 std::set<TabContents*> attached_contents_; | 365 std::set<TabContents*> attached_contents_; |
| 365 }; | 366 }; |
| 366 | 367 |
| 367 #endif // CONTENT_BROWSER_TAB_CONTENTS_TAB_CONTENTS_DELEGATE_H_ | 368 #endif // CONTENT_BROWSER_TAB_CONTENTS_TAB_CONTENTS_DELEGATE_H_ |
| OLD | NEW |