Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(29)

Side by Side Diff: content/browser/tab_contents/tab_contents_delegate.h

Issue 7464009: Removal of Profile from content part 1. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: works now Created 9 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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/navigation_types.h" 14 #include "content/common/navigation_types.h"
15 #include "content/common/page_transition_types.h" 15 #include "content/common/page_transition_types.h"
16 #include "ui/gfx/native_widget_types.h" 16 #include "ui/gfx/native_widget_types.h"
17 #include "webkit/glue/window_open_disposition.h" 17 #include "webkit/glue/window_open_disposition.h"
18 18
19 namespace content { 19 namespace content {
20 class BrowserContext;
20 class JavaScriptDialogCreator; 21 class JavaScriptDialogCreator;
21 } 22 }
22 23
23 namespace gfx { 24 namespace gfx {
24 class Point; 25 class Point;
25 class Rect; 26 class Rect;
26 class Size; 27 class Size;
27 } 28 }
28 29
29 namespace history { 30 namespace history {
30 class HistoryAddPageArgs; 31 class HistoryAddPageArgs;
31 } 32 }
32 33
33 struct ContextMenuParams; 34 struct ContextMenuParams;
34 class DownloadItem; 35 class DownloadItem;
35 class GURL; 36 class GURL;
36 class HtmlDialogUIDelegate; 37 class HtmlDialogUIDelegate;
37 struct NativeWebKeyboardEvent; 38 struct NativeWebKeyboardEvent;
38 class Profile;
39 class RenderViewHost; 39 class RenderViewHost;
40 class TabContents; 40 class TabContents;
41 41
42 // Objects implement this interface to get notified about changes in the 42 // Objects implement this interface to get notified about changes in the
43 // TabContents and to provide necessary functionality. 43 // TabContents and to provide necessary functionality.
44 class TabContentsDelegate { 44 class TabContentsDelegate {
45 public: 45 public:
46 TabContentsDelegate(); 46 TabContentsDelegate();
47 47
48 // Opens a new URL inside the passed in TabContents (if source is 0 open 48 // Opens a new URL inside the passed in TabContents (if source is 0 open
(...skipping 156 matching lines...) Expand 10 before | Expand all | Expand 10 after
205 // Returns true if the context menu operation was handled by the delegate. 205 // Returns true if the context menu operation was handled by the delegate.
206 virtual bool HandleContextMenu(const ContextMenuParams& params); 206 virtual bool HandleContextMenu(const ContextMenuParams& params);
207 207
208 // Returns true if the context menu command was handled 208 // Returns true if the context menu command was handled
209 virtual bool ExecuteContextMenuCommand(int command); 209 virtual bool ExecuteContextMenuCommand(int command);
210 210
211 // Shows the page info using the specified information. 211 // Shows the page info using the specified information.
212 // |url| is the url of the page/frame the info applies to, |ssl| is the SSL 212 // |url| is the url of the page/frame the info applies to, |ssl| is the SSL
213 // information for that page/frame. If |show_history| is true, a section 213 // information for that page/frame. If |show_history| is true, a section
214 // showing how many times that URL has been visited is added to the page info. 214 // showing how many times that URL has been visited is added to the page info.
215 virtual void ShowPageInfo(Profile* profile, 215 virtual void ShowPageInfo(content::BrowserContext* context,
216 const GURL& url, 216 const GURL& url,
217 const NavigationEntry::SSLStatus& ssl, 217 const NavigationEntry::SSLStatus& ssl,
218 bool show_history); 218 bool show_history);
219 219
220 // Opens source view for given tab contents that is navigated to the given 220 // Opens source view for given tab contents that is navigated to the given
221 // page url. 221 // page url.
222 virtual void ViewSourceForTab(TabContents* source, const GURL& page_url); 222 virtual void ViewSourceForTab(TabContents* source, const GURL& page_url);
223 223
224 // Opens source view for the given subframe. 224 // Opens source view for the given subframe.
225 virtual void ViewSourceForFrame(TabContents* source, 225 virtual void ViewSourceForFrame(TabContents* source,
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after
299 void Attach(TabContents* source); 299 void Attach(TabContents* source);
300 300
301 // Called when |this| is no longer the TabContentsDelegate for |source|. 301 // Called when |this| is no longer the TabContentsDelegate for |source|.
302 void Detach(TabContents* source); 302 void Detach(TabContents* source);
303 303
304 // The TabContents that this is currently a delegate for. 304 // The TabContents that this is currently a delegate for.
305 std::set<TabContents*> attached_contents_; 305 std::set<TabContents*> attached_contents_;
306 }; 306 };
307 307
308 #endif // CONTENT_BROWSER_TAB_CONTENTS_TAB_CONTENTS_DELEGATE_H_ 308 #endif // CONTENT_BROWSER_TAB_CONTENTS_TAB_CONTENTS_DELEGATE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698