summaryrefslogtreecommitdiffstats
path: root/extensions/browser/guest_view
Commit message (Collapse)AuthorAgeFilesLines
* Remove a debugging CHECK from MimeHandlerViewGuest.sammc2016-03-141-12/+6
| | | | | | | | | | | | With https://crrev.com/366034, the guest will be destroyed if it's detached so DocumentOnLoadCompletedInMainFrame() will only be called in a state where embedder_web_contents() is valid. BUG=569990 Review URL: https://codereview.chromium.org/1798663003 Cr-Commit-Position: refs/heads/master@{#380932}
* Remove the ability of webpages to specify strings for the onbeforeunload dialog.avi2016-03-112-2/+0
| | | | | | | | | | BUG=587940 TEST=as in bug CQ_INCLUDE_TRYBOTS=tryserver.chromium.linux:linux_site_isolation Review URL: https://codereview.chromium.org/1714573002 Cr-Commit-Position: refs/heads/master@{#380755}
* Replace web_cache_messages.h with Mojo service.leon.han2016-03-111-1/+1
| | | | | | | | | | | | Implement WebCache Mojo interface to receive/handle the requests which were sent via the Chromium IPC messages defined in web_cache_messages.h. BUG=577685 Review URL: https://codereview.chromium.org/1706603004 Cr-Commit-Position: refs/heads/master@{#380598}
* extensions: Add out-of-line copy ctors for complex classes.vmpstr2016-02-274-0/+8
| | | | | | | | | | | | | This patch adds out of line copy constructors for classes that our clang-plugin considers heavy. This is an effort to enable copy constructor checks by default. BUG=436357 R=reillyg@chromium.org, dcheng@chromium.org, thakis@chromium.org Review URL: https://codereview.chromium.org/1724293002 Cr-Commit-Position: refs/heads/master@{#378054}
* Remove user gesture bit from PermissionContext code.mlamouri2016-02-173-4/+1
| | | | | | | | | | | | | | | | | | | This CL removes the user gesture bit from PermissionContext and all its sub classes. The user gesture information was required by the permission bubble code. With bug 545476 fixed, this is no longer needed. This CL is the first CL in a suite of three CL that remove the passing of the user gesture information from the renderer process content layer to the browser process chrome layer: 1. <this> 2. https://codereview.chromium.org/1695953002 3. https://codereview.chromium.org/1696883004 BUG=423770 Review URL: https://codereview.chromium.org/1695943002 Cr-Commit-Position: refs/heads/master@{#375839}
* Make extensions use a correct same-origin check.palmer2016-02-032-4/+5
| | | | | | | | | | GURL::GetOrigin does not do the right thing for all types of URLs. BUG=573317 Review URL: https://codereview.chromium.org/1658913002 Cr-Commit-Position: refs/heads/master@{#373381}
* Remove linked_ptr usage in //base.dcheng2016-02-028-84/+73
| | | | | | | | | | And clean up some code that didn't IWYU. BUG=556939 Review URL: https://codereview.chromium.org/1641563002 Cr-Commit-Position: refs/heads/master@{#372977}
* Extension cleanup (mostly includes)treib2016-02-021-0/+1
| | | | | | | | | | | | BUG=none TBRing trivial include changes TBR=derat@chromium.org TBR=benwells@chromium.org Review URL: https://codereview.chromium.org/1654043002 Cr-Commit-Position: refs/heads/master@{#372945}
* Implement webview.captureVisibleRegion()wjmaclean2016-02-011-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This CL implements webview.captureVisibleRegion(), an extension/apps API to allow WebView users to capture screenshots of the contents displayed in a WebView. The surfaces contents capture has been plumbed via RenderWidgetHostViewChildFrame so this implementation should not require changes when WebView switches to using OOPIF. As part of the implementation, there are two notable refactors: 1) CaptureWebContentsFunction has been refactored into WebContentsCaptureClient to remove the extensions::AsyncExtensionFunction dependence so that this code can be used by both tabs.captureVisibleTab and webview.captureVisibleRegion, and 2) common code from DelegatedFrameHost has ben moved to content/browser/compositor/surface_utils.* in order to avoid duplication as both DelegatedFrameHost and RenderWidgetHostViewChildFrame now use the code. Finally, this CL adds a surface-drawn callback to RenderWidgetHostViewChildFrame, to allow deferring a screen capture request until a frame has actually been drawn. This callback can be used to simplify some existing tests. BUG=326755 CQ_INCLUDE_TRYBOTS=tryserver.chromium.linux:linux_site_isolation Review URL: https://codereview.chromium.org/1635513003 Cr-Commit-Position: refs/heads/master@{#372799}
* Remove the code added to make extensions compile on Aura Android.mfomitchev2016-01-281-3/+0
| | | | | | | | BUG=NONE Review URL: https://codereview.chromium.org/1551423003 Cr-Commit-Position: refs/heads/master@{#372106}
* Revert of Implement webview.captureVisibleRegion() (patchset #9 id:160001 of ↵tsergeant2016-01-211-3/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | https://codereview.chromium.org/1582053002/ ) Reason for revert: The test WebViewAPITest.TestCaptureVisibleRegion is failing on several windows bots: https://build.chromium.org/p/chromium.win/builders/Win7%20Tests%20%28dbg%29%281%29/builds/45040 https://build.chromium.org/p/chromium.win/builders/XP%20Tests%20%281%29/builds/42690 https://build.chromium.org/p/chromium.win/builders/Vista%20Tests%20%281%29/builds/64394 Original issue's description: > Implement webview.captureVisibleRegion() > > This CL implements webview.captureVisibleRegion(), an extension/apps > API to allow WebView users to capture screenshots of the contents > displayed in a WebView. The surfaces contents capture has been plumbed > via RenderWidgetHostViewChildFrame so this implementation should not > require changes when WebView switches to using OOPIF. > > As part of the implementation, there are two notable refactors: > > 1) CaptureWebContentsFunction has been refactored into > WebContentsCaptureClient to remove the extensions::AsyncExtensionFunction > dependence so that this code can be used by both tabs.captureVisibleTab > and webview.captureVisibleRegion, and > > 2) common code from DelegatedFrameHost has ben moved to > content/browser/compositor/surface_utils.* in order to avoid duplication > as both DelegatedFrameHost and RenderWidgetHostViewChildFrame now > use the code. > > BUG=326755 > > Committed: https://crrev.com/5b8cdcc82fc9da7bab15fd3dbf65df843dc73589 > Cr-Commit-Position: refs/heads/master@{#370565} TBR=rockot@chromium.org,creis@chromium.org,kenrb@chromium.org,nick@chromium.org,fsamuel@chromium.org,wjmaclean@chromium.org # Skipping CQ checks because original CL landed less than 1 days ago. NOPRESUBMIT=true NOTREECHECKS=true NOTRY=true BUG=326755 Review URL: https://codereview.chromium.org/1614703003 Cr-Commit-Position: refs/heads/master@{#370641}
* Implement webview.captureVisibleRegion()wjmaclean2016-01-211-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | This CL implements webview.captureVisibleRegion(), an extension/apps API to allow WebView users to capture screenshots of the contents displayed in a WebView. The surfaces contents capture has been plumbed via RenderWidgetHostViewChildFrame so this implementation should not require changes when WebView switches to using OOPIF. As part of the implementation, there are two notable refactors: 1) CaptureWebContentsFunction has been refactored into WebContentsCaptureClient to remove the extensions::AsyncExtensionFunction dependence so that this code can be used by both tabs.captureVisibleTab and webview.captureVisibleRegion, and 2) common code from DelegatedFrameHost has ben moved to content/browser/compositor/surface_utils.* in order to avoid duplication as both DelegatedFrameHost and RenderWidgetHostViewChildFrame now use the code. BUG=326755 Review URL: https://codereview.chromium.org/1582053002 Cr-Commit-Position: refs/heads/master@{#370565}
* Remove unused transferred_global_request_id parameter.creis2016-01-142-9/+6
| | | | | | | | | | | | | | After removing OpenURLFromTab from navigation transfers in https://crrev.com/365443, we no longer need to pass the request ID through OpenURLParams or NavigateParams. (We still need the ID in LoadURLParams for now.) BUG=495161 TEST=No behavior change. Review URL: https://codereview.chromium.org/1579363002 Cr-Commit-Position: refs/heads/master@{#369448}
* [Media Router] Replace old MR extension ID with "new" extension ID.imcheng2016-01-121-1/+1
| | | | | | | | | | | | | | | Search and replace of all occurrences of the current MR extension ID with the new one we would like to use. The extensions will be identical. Since we haven't enabled Media Router there is no impact on existing users. Please see bug for additional background/details. BUG=574889 Review URL: https://codereview.chromium.org/1576563002 Cr-Commit-Position: refs/heads/master@{#368966}
* Add a missing switch-case break in WebView UMAtzik2015-12-291-0/+1
| | | | | | | | BUG= Review URL: https://codereview.chromium.org/1546263002 Cr-Commit-Position: refs/heads/master@{#367077}
* Switch to standard integer types in extensions/browser/.avi2015-12-2322-29/+57
| | | | | | | | | BUG=138542 TBR=benwells@chromium.org Review URL: https://codereview.chromium.org/1549643002 Cr-Commit-Position: refs/heads/master@{#366702}
* Handle HTTP headers case-insensitively on the test servertzik2015-12-211-2/+1
| | | | | | | | | | | | The HTTP spec says the name of HTTP headers should be case-insensitive, while our embedded test server doesn't. That blocks a on-going Blink side change for the case normalization of HTTP header names. BUG=556969 Review URL: https://codereview.chromium.org/1474603002 Cr-Commit-Position: refs/heads/master@{#366348}
* Convert Pass()→std::move() in //extensionsdcheng2015-12-1810-32/+48
| | | | | | | | BUG=557422 Review URL: https://codereview.chromium.org/1537893002 Cr-Commit-Position: refs/heads/master@{#366120}
* Only send MimeHandlerViewGuestOnLoadCompleted messages when the guest is ↵raymes2015-12-171-3/+12
| | | | | | | | | | | | | | | | | | | attached. Even though DocumentOnLoadCompletedInMainFrame should never be called before the MimeHandlerViewGuest has been attached, it may be called after it has become detached from its embedder. In this case we need to be careful not to access the embedder. A CHECK has also been added to confirm that the crash in the associated bug isn't because the MimeHandlerViewGuests embedder has been destroyed. (I believe it should be alive at this point). BUG=569990 Review URL: https://codereview.chromium.org/1531173002 Cr-Commit-Position: refs/heads/master@{#365756}
* Make Lucas a GuestView OWNERfsamuel2015-12-091-0/+1
| | | | | | | | BUG=none Review URL: https://codereview.chromium.org/1505273002 Cr-Commit-Position: refs/heads/master@{#363949}
* Track all extension frames in ProcessManager, inspect extensionoptionsrob2015-12-061-1/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | ProcessManager::GetRenderFrameHostsForExtension did not return all RFHs for a given extension, because of two errors: 1. An extension can have multiple SiteInstances, so SiteInstances should not be compared by pointer. 2. ExtensionWebContentsObserver failed to register RFHs after a process swap. I discovered this when I noticed that tests started to fail unexpectedly after applying https://codereview.chromium.org/1413543005. That patch changes the extension messaging API, to route messages to RFHs instead of processes. This requires extension frames to be tracked correctly... Extension tabs, frames, etc. are now visible at "Inspect views" in the extensions view (when developer mode is enabled), thanks to the fact that all extension frames are now being tracked (excluding extension frames that are hosted in a view without classification, e.g. developer tools and most of the GuestViews). BUG=432875,550022 CQ_INCLUDE_TRYBOTS=tryserver.chromium.linux:linux_site_isolation TEST=ExtensionApiTest.MessagingNoBackground does not fail any more with https://codereview.chromium.org/1413543005 after applying this patch. DeveloperPrivateApiTest.InspectEmbeddedOptionsPage passes. ProcessManagerBrowserTest.NoBackgroundPage passes. ProcessManagerBrowserTest.FrameClassification passes with and without OOPIF. Review URL: https://codereview.chromium.org/1413853005 Cr-Commit-Position: refs/heads/master@{#363368}
* Fix ExtensionApiTest.ContentScriptExtensionIframe for --isolate-extensions.alexmos2015-12-021-6/+9
| | | | | | | | | | | | | | | This requires making the test aware of kIsolateExtensions, so that it can adjust its expectations accordingly. Since the schema in extensions/common/api/test.json is also used in extensions_browsertests (by web_view_apitest.cc), this also required moving kIsolateExtensions to a location where those tests can reference them, namely extensions/common/switches.cc. BUG=532666 Review URL: https://codereview.chromium.org/1457163002 Cr-Commit-Position: refs/heads/master@{#362580}
* Fix LoadDataWithBaseURL reloadboliu2015-11-241-2/+4
| | | | | | | | | | | | | | | | | | | | | | On a LoadDataWithBaseURL, renderer reports the history URL as the URL of the navigation, and is stored in the NavigationEntry::GetURL field, overwriting the data URL originally stored there. This causes a crash on a reload since the data URL has been lost. Fix this by saving the data URL DocumentState so that renderer can return it as the URL of the load. This means that GetURL and GetOriginalURL for a LoadDataWithBaseURL will now return the data URL, not the history URL. Also fix WebFrame::LoadData to not create new navigation for a reload. BUG=522567 Review URL: https://codereview.chromium.org/1304373007 Cr-Commit-Position: refs/heads/master@{#361481}
* Migrating tests to use EmbeddedTestServer (misc)svaldez2015-11-191-1/+1
| | | | | | | | | | | | | | | - Moving tests to use EmbeddedTestServer where possible. - net::test_server::EmbeddedTestServer references to net::EmbeddedTestServer - Using server.Start() instead of server.InitializeAndWaitUntilReady() - Renaming test_server() to be spawned_test_server() or embedded_test_server() - Enabling tests disabled due to SpawnedTestServer compatibility BUG=496825 TBR=brettw@chromium.org,jochen@chromium.org Review URL: https://codereview.chromium.org/1431653003 Cr-Commit-Position: refs/heads/master@{#360598}
* Aura on Android: build gn target extensions/browser.moshayedi2015-11-171-0/+3
| | | | | | | | | | | | Changes necessary to get extensions/browser build on Android when using use_aura=true. Most of these changes are because we don't have USB support for Aura on Android yet. This is a prerequisite for building the "extensions" target for Aura on Android. BUG=548797 Review URL: https://codereview.chromium.org/1416513006 Cr-Commit-Position: refs/heads/master@{#360073}
* [Reland] [ExtensionView] Add extension id whitelisting for ExtensionView.apacible2015-11-134-1/+73
| | | | | | | | | | | | | | | | Per discussion with Chrome Eng Review, all extension ids that can be loaded by ExtensionView will be explicitly whitelisted in extension_view_whitelist.cc/h. This change whitelists the extension id used in browser tests, as well extension ids related to Media Router. This also removes some old logging and simplifies the test skeleton extensions. This is a reland of https://codereview.chromium.org/1419143009. BUG=552207, 552208 Review URL: https://codereview.chromium.org/1438733003 Cr-Commit-Position: refs/heads/master@{#359605}
* Prevent guest views from issuing a search for empty text.thestig2015-11-121-0/+7
| | | | | | | | | | | | Do the same for Android webview. Set up roadblocks along the way to prevent this from happening again. BUG=535086 Review URL: https://codereview.chromium.org/1365563003 Cr-Commit-Position: refs/heads/master@{#359419}
* Revert of [ExtensionView] Add extension id whitelisting for ExtensionView. ↵tommi2015-11-114-73/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | (patchset #3 id:100001 of https://codereview.chromium.org/1419143009/ ) Reason for revert: Reverting due to global variable (sizes regression). Original issue's description: > [ExtensionView] Add extension id whitelisting for ExtensionView. > > Per discussion with Chrome Eng Review, all extension ids that can be loaded by ExtensionView will be explicitly whitelisted in extension_view_whitelist.cc/h. > > This change whitelists the extension id used in browser tests, as well extension ids related to Media Router. > > This also removes some old logging and simplifies the test skeleton extensions. > > BUG=552207, 552208 > > Committed: https://crrev.com/47fa637f50f0bbf984b14b8dacbf8ed66e552091 > Cr-Commit-Position: refs/heads/master@{#359053} TBR=brettw@chromium.org,apacible@chromium.org NOPRESUBMIT=true NOTREECHECKS=true NOTRY=true BUG=552207, 552208 Review URL: https://codereview.chromium.org/1434913002 Cr-Commit-Position: refs/heads/master@{#359077}
* [ExtensionView] Add extension id whitelisting for ExtensionView.apacible2015-11-114-1/+73
| | | | | | | | | | | | | | Per discussion with Chrome Eng Review, all extension ids that can be loaded by ExtensionView will be explicitly whitelisted in extension_view_whitelist.cc/h. This change whitelists the extension id used in browser tests, as well extension ids related to Media Router. This also removes some old logging and simplifies the test skeleton extensions. BUG=552207, 552208 Review URL: https://codereview.chromium.org/1419143009 Cr-Commit-Position: refs/heads/master@{#359053}
* MimeHandlerViewGuest: Ignore title changes due to navigations.sammc2015-11-101-0/+5
| | | | | | | | | | | | | | | Currently, when a mime handler is loaded, the URL of the mime handler is used as the embedder's title. This causes that title to flicker between the URL of the content, the URL of the mime handler and the title set by the mime handler. This changes MimeHandlerViewGuest to only update the embedder's title when the mime handler's title changes without the URL also changing. BUG=47914 Review URL: https://codereview.chromium.org/1431713004 Cr-Commit-Position: refs/heads/master@{#358778}
* SSL and add handlers in EmbeddedTestServersvaldez2015-10-281-6/+2
| | | | | | | | | | | | | | | | | | | | | | | (This is a re-landing of CL 1376593007) As part of the migration of tests to EmbeddedTestServer, this CL modifies EmbeddedTestServer to support SSLServerSocket and to add shared default handlers that can be used by tests to mirror the SpawnedTestServer handlers. The major changes are: - SSL support through SSLServerSocket - Adding SSLServerConfig to configure SSLServerSockets. - Setting up default handlers for BrowserTestBase tests. - Asynchronous HttpResponse. - Moving EmbeddedTestServer to the net:: namespace. BUG=496825, 548358, 548492 NOPRESUBMIT=TRUE TBR=davidben@chromium.org,kelvinp@chromium.org,lazyboy@chromium.org,sergeyu@chromium.org Review URL: https://codereview.chromium.org/1411573006 Cr-Commit-Position: refs/heads/master@{#356616}
* Revert of SSL in EmbeddedTestServer (patchset #55 id:1070001 of ↵stevenjb2015-10-271-2/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | https://codereview.chromium.org/1376593007/ ) Reason for revert: This breaks cros_trunk, failure started here: http://master.chrome.corp.google.com:8011/builders/cros%20trunk/builds/40350 crbug.com/548358 Original issue's description: > SSL and add handlers in EmbeddedTestServer > > As part of the migration of tests to EmbeddedTestServer, this CL modifies > EmbeddedTestServer to support SSLServerSocket and to add shared default handlers > that can be used by tests to mirror the SpawnedTestServer handlers. The major > changes are: > > - SSL support through SSLServerSocket > - Adding SSLServerConfig to configure SSLServerSockets. > - Setting up default handlers for BrowserTestBase tests. > - Asynchronous HttpResponse. > - Moving EmbeddedTestServer to the net:: namespace. > > BUG=496825 > NOPRESUBMIT=TRUE > > Committed: https://crrev.com/5c265faa70626b7754e8b62300f65771dae2adbf > Cr-Commit-Position: refs/heads/master@{#356305} TBR=davidben@chromium.org,kelvinp@chromium.org,lazyboy@chromium.org,mmenke@chromium.org,asanka@chromium.org,sergeyu@chromium.org,svaldez@chromium.org NOPRESUBMIT=true NOTREECHECKS=true NOTRY=true BUG=496825 Review URL: https://codereview.chromium.org/1421903008 Cr-Commit-Position: refs/heads/master@{#356411}
* Add MimeHandlerViewGuest::NavigationStateChanged to handle title changesthestig2015-10-272-0/+21
| | | | | | | | | | and propagate them upwards to the embedder. BUG=47914 Review URL: https://codereview.chromium.org/1412073002 Cr-Commit-Position: refs/heads/master@{#356366}
* SSL and add handlers in EmbeddedTestServersvaldez2015-10-271-6/+2
| | | | | | | | | | | | | | | | | | | | As part of the migration of tests to EmbeddedTestServer, this CL modifies EmbeddedTestServer to support SSLServerSocket and to add shared default handlers that can be used by tests to mirror the SpawnedTestServer handlers. The major changes are: - SSL support through SSLServerSocket - Adding SSLServerConfig to configure SSLServerSockets. - Setting up default handlers for BrowserTestBase tests. - Asynchronous HttpResponse. - Moving EmbeddedTestServer to the net:: namespace. BUG=496825 NOPRESUBMIT=TRUE Review URL: https://codereview.chromium.org/1376593007 Cr-Commit-Position: refs/heads/master@{#356305}
* Give the main frame a RenderWidget.dcheng2015-10-262-4/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Currently, RenderView is a subclass of RenderWidget, and the RenderWidget portion is effectively treated as the the widget for the main frame as well. For a number of reasons, this is a problematic model: - A remote frame doesn't need a widget; however, a RenderView with a remote main frame still has a vestigal RenderWidget. - Code that needs to affect both RenderWidget / RenderView is awkwardly split between them, in both content and blink. - RenderView itself is often seen as an easy entry point to perform page-level work in the renderer. With OOPI, this is no longer a valid assumption. In order to incrementally de-widgetize RenderView, the main frame will have also have a RenderWidget, to make it consistent with the local frame roots for subframes, which already have a RenderWidget. However, instead of giving main frames their own RenderWidget, the main frame re-uses the RenderView as its RenderWidget. The rationale for taking this approach is to minimize the breakage: today, Chrome simply doesn't expect to have two "widgets" for a frame. Instantiating a distinct RenderWidget for the main frame can confuse code that iterates or counts the active widgets: an example of this is the security check for injecting WebUI bindings. In the future, when RenderViewHost has-a RenderWidgetHost (and similarly, when RenderViewImpl has-a RenderWidget) instead of today's is-a relation, then it be conceptually much more straightforward to transition completely to the new model. BUG=419087 Review URL: https://codereview.chromium.org/1303773002 Cr-Commit-Position: refs/heads/master@{#356176}
* This patch reduces the public method footprint of GuestViewBase and derived ↵paulmeyer2015-10-216-203/+165
| | | | | | | | | | types. BUG=534320 Review URL: https://codereview.chromium.org/1392343002 Cr-Commit-Position: refs/heads/master@{#355420}
* Separate RenderViewHost from RenderWidgetHost, part 1: public interface.avi2015-10-151-6/+15
| | | | | | | | | | | This is the first part of the separation of RenderViewHost and RenderWidgetHost. The separation of the Impls is yet to come. BUG=478281 TEST=all green Review URL: https://codereview.chromium.org/1392323003 Cr-Commit-Position: refs/heads/master@{#354258}
* PDFs viewed inside a <webview> should navigate the same as PDFs in tabs.wjmaclean2015-09-291-11/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This CL is (sort-of) a reland of (1) https://codereview.chromium.org/1234403005/ as well as a revert of (2) https://codereview.chromium.org/1275173004 CL (2) broke the CL (1), in that chrome.tabs.update will always update the active tab in the browser window. If a user left-clicks on a link in the PDF viewer, the expectation is that the PDF contents will be replaced by the contents at the link, but that cannot happen if the PDF is displayed in an app and chrome.tabs.update is used. Also, https://codereview.chromium.org/1275173004 suggests that the advantage of chrome.tabs.update is to navigate from one file:// url to another, but based on other discussions, https://code.google.com/p/chromium/issues/detail?id=528505 this may not be appropriate. Finally, CL (1) broke context-menu navigations for links within webviews, namely "open in new tab", "open in new window" and "open in incognito window". This CL restricts itself to CURRENT_TAB navigations in order to fix that. BUG=532621 Review URL: https://codereview.chromium.org/1350073002 Cr-Commit-Position: refs/heads/master@{#351423}
* Removed a stale TODO in web_view_content_script_manager.h for work that has ↵paulmeyer2015-09-211-2/+0
| | | | | | | | | | | already been done. BUG=476938 TBR=hanxi@chromium.org Review URL: https://codereview.chromium.org/1361443002 Cr-Commit-Position: refs/heads/master@{#349924}
* Cleanup: Pass std::string as const reference from extensions/ki.stfu2015-09-211-3/+2
| | | | | | | | | | | | Passing std::string by reference can prevent extra copying of object. BUG=367418 TEST= R=reillyg@chromium.org,asargent@chromium.org Review URL: https://codereview.chromium.org/1340413004 Cr-Commit-Position: refs/heads/master@{#349905}
* Revert of Don't refer browser-initiated navigations to web-safe URLs to ↵wjmaclean2015-09-161-12/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | delegate. (patchset #2 id:20001 of https://codereview.chromium.org/1234403005/ ) Reason for revert: Since this CL was landed something has changed that causes clinking on links in the PDF viewer (embedded inside another WebView, e.g. the Chrome app "Browser Sample") to open in the wrong window, or in the case of "Open in a new tab", not be opened at all. Reverting this CL fixes https://code.google.com/p/chromium/issues/detail?id=529187 and https://code.google.com/p/chromium/issues/detail?id=521573 A new bug has been filed to capture the error where the links are not opened in the correct target window: https://code.google.com/p/chromium/issues/detail?id=532621 Original issue's description: > Don't refer browser-initiated navigations to web-safe URLs to delegate. > > In a previous CL (https://codereview.chromium.org/890183002) it was > decided to refer browser-initiated navigations to the owner WebContents' > delegate, on the assumption that the navigation was to a non-web-safe > url (e.g. a "chrome"-scheme url). However, this change can block > guest navigations to web-safe URLs just because they originated, for > example, from an extension. > > This CL ensures that navigations to web-safe URLs are not referred to > the delegate in order to allow them to succeed. > > BUG=488053 > > Committed: https://crrev.com/a03c23d32d176daf1e95cfffbfa333316e1eb1a6 > Cr-Commit-Position: refs/heads/master@{#339204} TBR=creis@chromium.org,lazyboy@chromium.org NOPRESUBMIT=true NOTREECHECKS=true NOTRY=true BUG=488053 Review URL: https://codereview.chromium.org/1350893002 Cr-Commit-Position: refs/heads/master@{#349208}
* Add missing histogram values for <webview>'s WebRequest API events.lazyboy2015-09-103-6/+25
| | | | | | | | | | | | This prevents hitting NOTREACHED() when calling .addListener on those events. BUG=528853 Test=Hangouts app should work in debug chromium. See bug for details. Review URL: https://codereview.chromium.org/1315713010 Cr-Commit-Position: refs/heads/master@{#348211}
* Move Singleton and related structs to namespace baseolli.raula2015-09-103-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Public APIs from base should live inside base:: so moved Singleton class and structs to base{} and fixed consumers. also fixed: ** Presubmit ERRORS ** Found Singleton<T> in the following header files. Please move them to an appropriate source file so that the template gets instantiated in a single compilation unit. chrome/browser/plugins/plugin_finder.h \ chromecast/media/base/media_message_loop.h \ content/browser/media/android/media_drm_credential_manager.h Presubmit warnings: src/chrome/browser/extensions/warning_badge_service_factory.h:5: #ifndef header guard has wrong style, please use: CHROME_BROWSER_EXTENSIONS_WARNING_BADGE_SERVICE_FACTORY_H_ [build/header_guard] [5] src/chrome/browser/extensions/warning_badge_service_factory.h:39: #endif line should be "#endif // CHROME_BROWSER_EXTENSIONS_WARNING_BADGE_SERVICE_FACTORY_H_" [build/header_guard] [5] TBR=jam@chromium.org Review URL: https://codereview.chromium.org/1308823002 Cr-Commit-Position: refs/heads/master@{#348136}
* Add wjmaclean@chromium.org to various guest_view/web_view OWNERS.wjmaclean2015-09-091-1/+2
| | | | | | | | BUG=none Review URL: https://codereview.chromium.org/1333663002 Cr-Commit-Position: refs/heads/master@{#347966}
* This patch allows the webview.partitions.accessible_resources entry in ↵paulmeyer2015-09-093-12/+34
| | | | | | | | | | | | chrome app manifests to work fully as intended. Previously, web pages attempting to use resources specified as webview accessible would fail to load those resources. This happened because a check in the renderer would stop the resource request from being made before the request ever reached the browser process where the webview accessible resources are checked in the manifest. This patch corrects this problem by propagating webview partition IDs to webview guest renderer processes, so that they can check the correct entry in the manifest for accessible resources and allow valid requests to go through to the browser process. BUG=460797 Review URL: https://codereview.chromium.org/1312653003 Cr-Commit-Position: refs/heads/master@{#347936}
* Fixing the Position of Context Menu for BrowserPlugin (<webview>)ekaramad2015-09-033-0/+9
| | | | | | | | | | | | | | | | | | | | With current implementation of the BrowserPlugin, all WebMouseEvents are routed, throught the browser (RenderWidgetHostViewGuest), to the renderer process of the guest. The guest uses the coordinates, as passed, for creating the ContextMenu event. Therefore, the guest renderer process is oblivious to any CSS transforms applied on the BrowserPlugin and as a result, the reported position of the context menu is potentially incorrect. This patch applies a hacky solution to resolve this issue. The work around is to store the location of the context menu from a MouseDown event. The position is measured form the global coordinates of the mouse event and the boundaries of the owner's view. BUG=470087 Review URL: https://codereview.chromium.org/1293963002 Cr-Commit-Position: refs/heads/master@{#347195}
* Add new termination status for failed child process launch.wfh2015-09-021-0/+2
| | | | | | | | | | | | | | Treat renderer startup failure as a renderer crash for metrics. This makes situations where sandbox failures are happening en-masse without crash reports being produced easier to spot on the stability dashboard. BUG=526198,467920 Review URL: https://codereview.chromium.org/1320153002 Cr-Commit-Position: refs/heads/master@{#347060}
* This patch allows WebViewRendererState to be accessible from both the UI and ↵paulmeyer2015-08-272-15/+34
| | | | | | | | | | IO threads. This access is mediated by locks for the two internal maps in the class. This patch is tested by a sebsequent patch that depends on it: https://codereview.chromium.org/1312653003/ Review URL: https://codereview.chromium.org/1313673003 Cr-Commit-Position: refs/heads/master@{#345917}
* This patch fixes the bug where find results were not showing up in the find ↵paulmeyer2015-08-244-35/+13
| | | | | | | | | | | | bar for the Chrome signin page. This also fixed the same bug (which was not reported) for extension options. This bug resulted from GuestViews not properly propagating FindReply data to their embedder when handling find requests in place of their embedder. BUG=524003 Review URL: https://codereview.chromium.org/1310333002 Cr-Commit-Position: refs/heads/master@{#345192}
* This patch removes all the unnecessary content:: prefixes on WebContents ↵paulmeyer2015-08-245-61/+46
| | | | | | | | references in guest_view_base.cc and other GuestView files. Review URL: https://codereview.chromium.org/1307243002 Cr-Commit-Position: refs/heads/master@{#345148}