~osomon/oxide/i18n

« back to all changes in this revision

Viewing changes to patches/expose-extra-properties-for-should-create-webcontents.patch

  • Committer: Olivier Tilloy
  • Date: 2014-04-08 10:03:11 UTC
  • mfrom: (312.2.173 oxide)
  • Revision ID: olivier.tilloy@canonical.com-20140408100311-b3zb7q1jfrevbrf1
Merge the latest changes from trunk.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
# HG changeset patch
 
2
# Parent 93ddb2b66f2cf5a8ae8986160f88c765cc8e55a8
 
3
# User oxide
 
4
 
 
5
diff --git a/content/browser/web_contents/web_contents_impl.cc b/content/browser/web_contents/web_contents_impl.cc
 
6
--- a/content/browser/web_contents/web_contents_impl.cc
 
7
+++ b/content/browser/web_contents/web_contents_impl.cc
 
8
@@ -1336,17 +1336,19 @@ void WebContentsImpl::CreateNewWindow(
 
9
 
 
10
   if (delegate_ &&
 
11
       !delegate_->ShouldCreateWebContents(this,
 
12
                                           route_id,
 
13
                                           params.window_container_type,
 
14
                                           params.frame_name,
 
15
                                           params.target_url,
 
16
                                           partition_id,
 
17
-                                          session_storage_namespace)) {
 
18
+                                          session_storage_namespace,
 
19
+                                          params.disposition,
 
20
+                                          params.user_gesture)) {
 
21
     if (route_id != MSG_ROUTING_NONE &&
 
22
         !RenderViewHost::FromID(render_process_id, route_id)) {
 
23
       // If the embedder didn't create a WebContents for this route, we need to
 
24
       // delete the RenderView that had already been created.
 
25
       Send(new ViewMsg_Close(route_id));
 
26
     }
 
27
     GetRenderViewHost()->GetProcess()->ResumeRequestsForView(route_id);
 
28
     GetRenderViewHost()->GetProcess()->ResumeRequestsForView(
 
29
diff --git a/content/public/browser/web_contents_delegate.cc b/content/public/browser/web_contents_delegate.cc
 
30
--- a/content/public/browser/web_contents_delegate.cc
 
31
+++ b/content/public/browser/web_contents_delegate.cc
 
32
@@ -127,17 +127,19 @@ bool WebContentsDelegate::OnGoToEntryOff
 
33
 
 
34
 bool WebContentsDelegate::ShouldCreateWebContents(
 
35
     WebContents* web_contents,
 
36
     int route_id,
 
37
     WindowContainerType window_container_type,
 
38
     const base::string16& frame_name,
 
39
     const GURL& target_url,
 
40
     const std::string& partition_id,
 
41
-    SessionStorageNamespace* session_storage_namespace) {
 
42
+    SessionStorageNamespace* session_storage_namespace,
 
43
+    WindowOpenDisposition window_open_disposition,
 
44
+    bool user_gesture) {
 
45
   return true;
 
46
 }
 
47
 
 
48
 JavaScriptDialogManager* WebContentsDelegate::GetJavaScriptDialogManager() {
 
49
   return NULL;
 
50
 }
 
51
 
 
52
 bool WebContentsDelegate::EmbedsFullscreenWidget() const {
 
53
diff --git a/content/public/browser/web_contents_delegate.h b/content/public/browser/web_contents_delegate.h
 
54
--- a/content/public/browser/web_contents_delegate.h
 
55
+++ b/content/public/browser/web_contents_delegate.h
 
56
@@ -295,17 +295,19 @@ class CONTENT_EXPORT WebContentsDelegate
 
57
   // be destroyed.
 
58
   virtual bool ShouldCreateWebContents(
 
59
       WebContents* web_contents,
 
60
       int route_id,
 
61
       WindowContainerType window_container_type,
 
62
       const base::string16& frame_name,
 
63
       const GURL& target_url,
 
64
       const std::string& partition_id,
 
65
-      SessionStorageNamespace* session_storage_namespace);
 
66
+      SessionStorageNamespace* session_storage_namespace,
 
67
+      WindowOpenDisposition window_open_disposition,
 
68
+      bool user_gesture);
 
69
 
 
70
   // Notifies the delegate about the creation of a new WebContents. This
 
71
   // typically happens when popups are created.
 
72
   virtual void WebContentsCreated(WebContents* source_contents,
 
73
                                   int opener_render_frame_id,
 
74
                                   const base::string16& frame_name,
 
75
                                   const GURL& target_url,
 
76
                                   WebContents* new_contents) {}