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

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

Issue 790423002: Add the main frame routing ID to WebContentsDelegate, use it in BackgroundContents. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: content shell Created 6 years 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
« no previous file with comments | « content/public/browser/web_contents.h ('k') | content/public/browser/web_contents_delegate.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 291 matching lines...) Expand 10 before | Expand all | Expand 10 after
302 virtual bool OnGoToEntryOffset(int offset); 302 virtual bool OnGoToEntryOffset(int offset);
303 303
304 // Allows delegate to control whether a WebContents will be created. Returns 304 // Allows delegate to control whether a WebContents will be created. Returns
305 // true to allow the creation. Default is to allow it. In cases where the 305 // true to allow the creation. Default is to allow it. In cases where the
306 // delegate handles the creation/navigation itself, it will use |target_url|. 306 // delegate handles the creation/navigation itself, it will use |target_url|.
307 // The embedder has to synchronously adopt |route_id| or else the view will 307 // The embedder has to synchronously adopt |route_id| or else the view will
308 // be destroyed. 308 // be destroyed.
309 virtual bool ShouldCreateWebContents( 309 virtual bool ShouldCreateWebContents(
310 WebContents* web_contents, 310 WebContents* web_contents,
311 int route_id, 311 int route_id,
312 int main_frame_route_id,
312 WindowContainerType window_container_type, 313 WindowContainerType window_container_type,
313 const base::string16& frame_name, 314 const base::string16& frame_name,
314 const GURL& target_url, 315 const GURL& target_url,
315 const std::string& partition_id, 316 const std::string& partition_id,
316 SessionStorageNamespace* session_storage_namespace); 317 SessionStorageNamespace* session_storage_namespace);
317 318
318 // Notifies the delegate about the creation of a new WebContents. This 319 // Notifies the delegate about the creation of a new WebContents. This
319 // typically happens when popups are created. 320 // typically happens when popups are created.
320 virtual void WebContentsCreated(WebContents* source_contents, 321 virtual void WebContentsCreated(WebContents* source_contents,
321 int opener_render_frame_id, 322 int opener_render_frame_id,
(...skipping 182 matching lines...) Expand 10 before | Expand all | Expand 10 after
504 // Called when |this| is no longer the WebContentsDelegate for |source|. 505 // Called when |this| is no longer the WebContentsDelegate for |source|.
505 void Detach(WebContents* source); 506 void Detach(WebContents* source);
506 507
507 // The WebContents that this is currently a delegate for. 508 // The WebContents that this is currently a delegate for.
508 std::set<WebContents*> attached_contents_; 509 std::set<WebContents*> attached_contents_;
509 }; 510 };
510 511
511 } // namespace content 512 } // namespace content
512 513
513 #endif // CONTENT_PUBLIC_BROWSER_WEB_CONTENTS_DELEGATE_H_ 514 #endif // CONTENT_PUBLIC_BROWSER_WEB_CONTENTS_DELEGATE_H_
OLDNEW
« no previous file with comments | « content/public/browser/web_contents.h ('k') | content/public/browser/web_contents_delegate.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698