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

Issue 13467038: Browser Plugin: Expose frame name changes to the content API (Closed)

Created:
7 years, 8 months ago by Fady Samuel
Modified:
7 years, 3 months ago
Reviewers:
lazyboy, Charlie Reis, jam, nasko
CC:
chromium-reviews, joi+watch-content_chromium.org, darin-cc_chromium.org, jam
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Visibility:
Public.

Description

Browser Plugin: Expose frame name changes to the content API. In the near future, the <webview> API will be moved out of content leaving only the core BrowserPlugin. This patch takes us towards that goal by exposing frame name updates to WebContentsObserver. BUG=166165

Patch Set 1 #

Patch Set 2 : Expose RenderViewHost::SetName to the content API #

Total comments: 3

Patch Set 3 : Updated #

Total comments: 5
Unified diffs Side-by-side diffs Delta from patch set Stats (+94 lines, -26 lines) Patch
M content/browser/browser_plugin/browser_plugin_guest.h View 1 2 3 chunks +4 lines, -5 lines 0 comments Download
M content/browser/browser_plugin/browser_plugin_guest.cc View 1 2 9 chunks +15 lines, -21 lines 3 comments Download
M content/browser/renderer_host/render_view_host_delegate.h View 1 chunk +6 lines, -0 lines 0 comments Download
M content/browser/renderer_host/render_view_host_impl.h View 1 2 2 chunks +4 lines, -0 lines 0 comments Download
M content/browser/renderer_host/render_view_host_impl.cc View 1 2 3 chunks +13 lines, -0 lines 0 comments Download
M content/browser/web_contents/web_contents_impl.h View 1 2 3 chunks +8 lines, -0 lines 0 comments Download
M content/browser/web_contents/web_contents_impl.cc View 1 2 3 chunks +30 lines, -0 lines 0 comments Download
M content/public/browser/render_view_host.h View 1 2 1 chunk +3 lines, -0 lines 0 comments Download
M content/public/browser/web_contents.h View 1 2 1 chunk +6 lines, -0 lines 1 comment Download
M content/public/browser/web_contents_observer.h View 1 chunk +5 lines, -0 lines 1 comment Download

Messages

Total messages: 10 (0 generated)
Fady Samuel
Hi Istiaque, Could you please take a quick look at this before I pass it ...
7 years, 8 months ago (2013-04-08 21:08:31 UTC) #1
lazyboy
lgtm Look OK.
7 years, 8 months ago (2013-04-08 22:01:21 UTC) #2
Fady Samuel
+jam@ for content/public review.
7 years, 8 months ago (2013-04-08 22:02:46 UTC) #3
Fady Samuel
On 2013/04/08 22:02:46, Fady Samuel wrote: > +jam@ for content/public review. and content review (Charlie ...
7 years, 8 months ago (2013-04-08 22:03:10 UTC) #4
jam
https://codereview.chromium.org/13467038/diff/6001/content/browser/browser_plugin/browser_plugin_guest.cc File content/browser/browser_plugin/browser_plugin_guest.cc (right): https://codereview.chromium.org/13467038/diff/6001/content/browser/browser_plugin/browser_plugin_guest.cc#newcode631 content/browser/browser_plugin/browser_plugin_guest.cc:631: rvh->SetName(name_); is the intent that this file will move ...
7 years, 8 months ago (2013-04-09 16:11:51 UTC) #5
Charlie Reis
[+nasko, since he's working on related frame stuff] Fady, does this need to be specific ...
7 years, 8 months ago (2013-04-17 17:35:21 UTC) #6
Fady Samuel
PTAL nasko, or creis
7 years, 8 months ago (2013-04-18 19:41:57 UTC) #7
Charlie Reis
Sorry, not sure if I was clear. This is still being set by BrowserPlugin code, ...
7 years, 8 months ago (2013-04-18 21:06:56 UTC) #8
Charlie Reis
On 2013/04/18 21:06:56, creis wrote: > Sorry, not sure if I was clear. This is ...
7 years, 8 months ago (2013-04-18 21:17:38 UTC) #9
Charlie Reis
7 years, 8 months ago (2013-04-18 21:26:50 UTC) #10
Ok, Nasko caught my mistake: I didn't realize RenderView was already
broadcasting the name updates, so some of this work is already done.

I think we understand why you're adding it to WebContentsObserver, but I don't
understand why the get/set API is needed on WebContents.

https://codereview.chromium.org/13467038/diff/12001/content/browser/browser_p...
File content/browser/browser_plugin/browser_plugin_guest.cc (right):

https://codereview.chromium.org/13467038/diff/12001/content/browser/browser_p...
content/browser/browser_plugin/browser_plugin_guest.cc:210:
GetWebContents()->SetWindowName(params.name);
Why is this needed?  Won't the RenderView tell the WebContents?

https://codereview.chromium.org/13467038/diff/12001/content/browser/browser_p...
content/browser/browser_plugin/browser_plugin_guest.cc:376:
new_contents_impl->SetWindowName(UTF16ToUTF8(frame_name));
Again, won't RenderView tell us?

https://codereview.chromium.org/13467038/diff/12001/content/browser/browser_p...
content/browser/browser_plugin/browser_plugin_guest.cc:965:
GetWebContents()->SetWindowName(name);
Again, why is this needed?  If we change the name in the RenderView, it will let
the WebContents know on its own.

https://codereview.chromium.org/13467038/diff/12001/content/public/browser/we...
File content/public/browser/web_contents.h (right):

https://codereview.chromium.org/13467038/diff/12001/content/public/browser/we...
content/public/browser/web_contents.h:183: // Allows reading and writing the
name of the top-level window.
I don't understand why we need this in the public WebContents API, since it
seems like the WebContentsObserver thing should be sufficient.  Can we eliminate
this?

https://codereview.chromium.org/13467038/diff/12001/content/public/browser/we...
File content/public/browser/web_contents_observer.h (right):

https://codereview.chromium.org/13467038/diff/12001/content/public/browser/we...
content/public/browser/web_contents_observer.h:140: virtual void
DidUpdateFrameName(int frame_id,
This needs a comment.

Powered by Google App Engine
This is Rietveld 408576698