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

Side by Side Diff: content/public/browser/web_contents_delegate.h

Issue 14985014: Introduce content::PageState (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Add comments to the top of page_state.h Created 7 years, 7 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) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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_PUBLIC_BROWSER_WEB_CONTENTS_DELEGATE_H_ 5 #ifndef CONTENT_PUBLIC_BROWSER_WEB_CONTENTS_DELEGATE_H_
6 #define CONTENT_PUBLIC_BROWSER_WEB_CONTENTS_DELEGATE_H_ 6 #define CONTENT_PUBLIC_BROWSER_WEB_CONTENTS_DELEGATE_H_
7 7
8 #include <set> 8 #include <set>
9 #include <string> 9 #include <string>
10 10
(...skipping 16 matching lines...) Expand all
27 namespace base { 27 namespace base {
28 class FilePath; 28 class FilePath;
29 class ListValue; 29 class ListValue;
30 } 30 }
31 31
32 namespace content { 32 namespace content {
33 class BrowserContext; 33 class BrowserContext;
34 class ColorChooser; 34 class ColorChooser;
35 class DownloadItem; 35 class DownloadItem;
36 class JavaScriptDialogManager; 36 class JavaScriptDialogManager;
37 class PageState;
37 class RenderViewHost; 38 class RenderViewHost;
38 class WebContents; 39 class WebContents;
39 class WebContentsImpl; 40 class WebContentsImpl;
40 struct ContextMenuParams; 41 struct ContextMenuParams;
41 struct FileChooserParams; 42 struct FileChooserParams;
42 struct NativeWebKeyboardEvent; 43 struct NativeWebKeyboardEvent;
43 struct SSLStatus; 44 struct SSLStatus;
44 } 45 }
45 46
46 namespace gfx { 47 namespace gfx {
(...skipping 186 matching lines...) Expand 10 before | Expand all | Expand 10 after
233 // Returns true if the context menu operation was handled by the delegate. 234 // Returns true if the context menu operation was handled by the delegate.
234 virtual bool HandleContextMenu(const content::ContextMenuParams& params); 235 virtual bool HandleContextMenu(const content::ContextMenuParams& params);
235 236
236 // Opens source view for given WebContents that is navigated to the given 237 // Opens source view for given WebContents that is navigated to the given
237 // page url. 238 // page url.
238 virtual void ViewSourceForTab(WebContents* source, const GURL& page_url); 239 virtual void ViewSourceForTab(WebContents* source, const GURL& page_url);
239 240
240 // Opens source view for the given subframe. 241 // Opens source view for the given subframe.
241 virtual void ViewSourceForFrame(WebContents* source, 242 virtual void ViewSourceForFrame(WebContents* source,
242 const GURL& url, 243 const GURL& url,
243 const std::string& content_state); 244 const PageState& page_state);
244 245
245 // Allows delegates to handle keyboard events before sending to the renderer. 246 // Allows delegates to handle keyboard events before sending to the renderer.
246 // Returns true if the |event| was handled. Otherwise, if the |event| would be 247 // Returns true if the |event| was handled. Otherwise, if the |event| would be
247 // handled in HandleKeyboardEvent() method as a normal keyboard shortcut, 248 // handled in HandleKeyboardEvent() method as a normal keyboard shortcut,
248 // |*is_keyboard_shortcut| should be set to true. 249 // |*is_keyboard_shortcut| should be set to true.
249 virtual bool PreHandleKeyboardEvent(WebContents* source, 250 virtual bool PreHandleKeyboardEvent(WebContents* source,
250 const NativeWebKeyboardEvent& event, 251 const NativeWebKeyboardEvent& event,
251 bool* is_keyboard_shortcut); 252 bool* is_keyboard_shortcut);
252 253
253 // Allows delegates to handle unhandled keyboard messages coming back from 254 // Allows delegates to handle unhandled keyboard messages coming back from
(...skipping 176 matching lines...) Expand 10 before | Expand all | Expand 10 after
430 // Called when |this| is no longer the WebContentsDelegate for |source|. 431 // Called when |this| is no longer the WebContentsDelegate for |source|.
431 void Detach(WebContents* source); 432 void Detach(WebContents* source);
432 433
433 // The WebContents that this is currently a delegate for. 434 // The WebContents that this is currently a delegate for.
434 std::set<WebContents*> attached_contents_; 435 std::set<WebContents*> attached_contents_;
435 }; 436 };
436 437
437 } // namespace content 438 } // namespace content
438 439
439 #endif // CONTENT_PUBLIC_BROWSER_WEB_CONTENTS_DELEGATE_H_ 440 #endif // CONTENT_PUBLIC_BROWSER_WEB_CONTENTS_DELEGATE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698