summaryrefslogtreecommitdiffstats
path: root/extensions/renderer/resources
Commit message (Collapse)AuthorAgeFilesLines
* Make the process-wide ServiceRegistry available to JS.sammc2016-03-245-5/+5
| | | | | | | | BUG=597465 Review URL: https://codereview.chromium.org/1827473002 Cr-Commit-Position: refs/heads/master@{#383008}
* Third patch to implement incognito support for Media Router.mfoltz2016-03-181-2/+5
| | | | | | | | | | | | | | | | | | | | | | | This patch implements policies around incognito: - OTR media routes created from OTR profiles are tracked. When the OTR profile is destroyed, we attempt to terminate the OTR media routes. - Enforces that the OTR status of routes returned from to CreateRoute(), JoinRoute(), or ConnectRouteByRouteId() matches the OTR status of the profile that called them. Patches will be submitted in this order: 1682853007: Adds support for off the record media routes. This patch: Implements incognito policies for Media Router. 1702533003: Enables UI for incognito profiles. BUG=524795 Review URL: https://codereview.chromium.org/1745493003 Cr-Commit-Position: refs/heads/master@{#381996}
* [Media Router] Add origins to sink query results.imcheng2016-03-151-2/+6
| | | | | | | | | | | | | | | | | | Takes over https://codereview.chromium.org/1693963003/ Add |origins| to |OnSinksReceived| API from MRPM to MR. If |origins| is non-empty, then the result of sink query is only valid for those origins. Otherwise, the result is valid for all origins, which is the legacy behavior. The origin checking is done in base MediaSinksObserver class, which will call into the version of |OnSinksReceived| overridable by children classes. BUG=594858 Review URL: https://codereview.chromium.org/1784533004 Cr-Commit-Position: refs/heads/master@{#381332}
* [chrome.displaySource] further implementation of call completion callbacksmikhail.pozdnyakov2016-02-261-3/+3
| | | | | | | | | | | | | | | | | | | The API implementation determines when and with which arguments the 'startSession'/'terminateSession' completion callbacks are invoked. The 'exceeded_session_limit_error' session error type is eliminated and substituted with 'startSession' completion callback call (which is more natural since this problem is detected before a new session is started). JS bindings code is simplified. BUG=242107 Review URL: https://codereview.chromium.org/1730583002 Cr-Commit-Position: refs/heads/master@{#377864}
* First patch to implement support for MR for off the record media routes ↵mfoltz2016-02-251-6/+14
| | | | | | | | | | | | | | | | | | (created by incognito profiles). This adds a flag to the CreateRoute and JoinRoute APIs that is set to true when the route request originates from an incognito profile. Also, an off_the_record flag is added to MediaRoute. Patch 1/3 of support for incognito: This patch: Adds support for off the record media routes. TBD: Enables UI for incognito profiles. TBD: Clean up routes when incognito profile destroyed. BUG=524795 Review URL: https://codereview.chromium.org/1682853007 Cr-Commit-Position: refs/heads/master@{#377711}
* [Media Router] Fix JS error in media_router_bindings.js.imcheng2016-02-251-2/+2
| | | | | | | | | | | | Also fix flipped if condition in presentation_dispatcher.cc. error was introduced in previous patch in crrev.com/1701143002. BUG=579360,574233,574234 Review URL: https://codereview.chromium.org/1731153003 Cr-Commit-Position: refs/heads/master@{#377485}
* Add directories handling support for apps/extensions.cmihail2016-02-251-6/+15
| | | | | | | | | | | | | | | The change introduces a "include_directories" entry in the manifest file for file_handlers. In case the value is true, the file handler becomes a generic handler and adds the given extension to the right click menu. BUG=415897 R=mtomasz@chromium.org Review URL: https://codereview.chromium.org/1407473003 Cr-Commit-Position: refs/heads/master@{#377467}
* Returns JS 'window' object for chrome.input.ime.createWindow API.shuchen2016-02-231-2/+4
| | | | | | | | | | This cl is based on cl https://codereview.chromium.org/1595313002. BUG=517773 Review URL: https://codereview.chromium.org/1649373002 Cr-Commit-Position: refs/heads/master@{#376959}
* [MediaRouter] Plumb PresentationConnectionClose from MR to Blink.imcheng2016-02-231-2/+37
| | | | | | | | | | | | | | | | | | | | | | | | | | Added some follow up plumbing in Blink for close reason, as well as to send the new event via a new method in PresentationConnection. Added plumbing in PresentationDispatcher and PresentationServiceImpl. Added a new class to hold the (state change, close) callbacks in content public API which will be used by PresentationServiceImpl and MR. Changed existing MR API to take the new callbacks object. Added new MediaRouterMojoImpl API to be notified of presentation connection close. Added plumbing in media_router_bindings.js TODO: add tests BUG=579360,574233,574234 Review URL: https://codereview.chromium.org/1701143002 Cr-Commit-Position: refs/heads/master@{#376935}
* [Extensions] Update web API cloberring for platform appsrdevlin.cronin2016-02-221-13/+36
| | | | | | | | | | | Platform App clobbering for certain Web APIs was incomplete. Make it more complete. See bug for more details. BUG=585282 Review URL: https://codereview.chromium.org/1716513002 Cr-Commit-Position: refs/heads/master@{#376784}
* Remove "experimental-html" from chrome.app.windowrob2016-02-151-4/+2
| | | | | | | | | The "experimental-html" frame option is behind a flag, undocumented and seems not used by real app developers. Review URL: https://codereview.chromium.org/1690893003 Cr-Commit-Position: refs/heads/master@{#375443}
* [chrome.displaySource] Session notification improvementsmikhail.pozdnyakov2016-02-111-19/+47
| | | | | | | | | | | | | | | | | | This patch provides several fixes and improvements (simplifications) to the session life cycle notification mechanism: 1) The 'startSession'/'terminateSession' call completion callbacks are invoked when the session is actually started/terminated and in accordance with 'onSessionStarted'/'onSessionTerminated' events propagating (and as per documentation). 2) The notification from the required sink is filtered out in browser process avoiding unneeded IPC calls 3) Methods in mojo interface are renamed in order to improve readability BUG=242107 Review URL: https://codereview.chromium.org/1674583002 Cr-Commit-Position: refs/heads/master@{#374929}
* [Media Router] Support custom timeout for route requests.imcheng2016-02-051-16/+65
| | | | | | | | | | | | | | | | | | | | | | | | | | | Add base::TimeDelta parameter to CreateRoute/JoinRoute/ ConnectRouteByRouteId APIs. This allows us to specify different timeout amounts depending on the source used in the route creation. This timeout will be provided to MRPM to be enforced. Note that if timeout is not provided, the MRPM will still use a default timeout in the interest of not keeping the extension alive indefinitely. In addition, a result code is added to the route response. Currently we have a TIMED_OUT code for timed out requests. In the future we can add more codes to differentiate error conditions in order to surface to pages that use Presentation API. Refactored the data of a route response into RouteRequestResult class. Modified the desktop UI code to pass in timeout amounts to CreateRoute and ConnectRouteByRouteId depending on source / cast mode. Also modified / simplified route request timeout logic in UI. BUG=581818,567368 Review URL: https://codereview.chromium.org/1639053003 Cr-Commit-Position: refs/heads/master@{#373708}
* Implement webview.captureVisibleRegion()wjmaclean2016-02-013-0/+34
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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}
* Fix the dynamic browser action setIcon path to work with any size icon.estade2016-01-231-59/+35
| | | | | | | | | BUG=564926,575256 TBR=benwells@chromium.org Review URL: https://codereview.chromium.org/1580983002 Cr-Commit-Position: refs/heads/master@{#371133}
* Revert of Implement webview.captureVisibleRegion() (patchset #9 id:160001 of ↵tsergeant2016-01-213-33/+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-213-0/+33
| | | | | | | | | | | | | | | | | | | | | | | | | | 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}
* Add domain to sink model and display if available.amp2016-01-151-0/+1
| | | | | | | | BUG=570797 Review URL: https://codereview.chromium.org/1578483002 Cr-Commit-Position: refs/heads/master@{#369642}
* [Media Router] Add Connecting state to PresentationConnection.imcheng2016-01-121-0/+2
| | | | | | | | BUG=575351 Review URL: https://codereview.chromium.org/1572433002 Cr-Commit-Position: refs/heads/master@{#368761}
* Ensure that sendMessage's callback is called.rob2016-01-091-7/+24
| | | | | | | | | | | | | Also: unchecked errors are now also reported to the extension's console. Unchecked errors were silenced before because the internal disconnect handler accessed chrome.runtime.lastError. BUG=439780 TEST=browser_tests --gtest_filter=ExtensionApiTest.MessagingCrash Review URL: https://codereview.chromium.org/1567423002 Cr-Commit-Position: refs/heads/master@{#368469}
* Non-Local Join for Media Router and Presentation APIboetger2016-01-081-7/+54
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | The Cast SDK has a concept of non-local joins. This means that if a Cast session is started on Device A (e.g. an Android phone), a user should be able to join the session via a webpage in Chrome on Device B. This requires the idea of "joinable" routes to enter into the media router. The route queries need a context for this to make sense, and that context is the page's |media_source|. If the route can be joined by the page (given the page's media_source), then a list of route_ids (that are a subset of the routes returned in OnRouteUpdated) signify what routes are joinable. The UI should present a "Join" button if the currently viewed route is joinable. Current Screenshots for MediaRoute Dialog Stop And Join - LTR: https://screenshot.googleplex.com/X814uW7esBU Stop Only - LTR: https://screenshot.googleplex.com/iybKZd1aABh Stop And Join - RTL: https://screenshot.googleplex.com/ffKqawTFgTF Stop Only - RTL: https://screenshot.googleplex.com/HWbR94H5Qef Review URL: https://codereview.chromium.org/1415103006 Cr-Commit-Position: refs/heads/master@{#368260}
* Use FrameTreeNode ID as frameId in extension APIsrob2016-01-061-0/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Use FrameTreeNode IDs instead of RenderFrame routing IDs as "frame id" in the extension APIs (webNavigation, webRequest, extension messaging) because FTN IDs are globally unique, and RFH IDs are not. This extends the public content API with: - RenderFrameHost::FromFrameTreeNodeId - RenderFrameHost::GetFrameTreeNodeId - WebContents::FindFrameByFrameTreeNodeId The extension APIs are modified as follows: - webRequest: * Frame IDs may be unavailable after frame removal (crbug.com/572930). * Blocking webRequest handlers may be slower than before due to an extra IO->UI->IO hop to determine the frameId (but this happens only once per frame load). - webNavigation: * processId is no longer required in chrome.webNavigation.getFrame, but marked as optional (deprecated) to make sure that the API is backwards-compatible. * frameId is constant across navigations. - Extension messaging (chrome.runtime.connect and friends): * Small change for extension developers in the following scenario: 1. Open port to tab. 2. Accept the port by listening to onConnect *in a child frame*. 3. Unload the document in the frame. Old behavior: onDisconnect was not triggered in the background until the tab was reloaded or closed. New behavior: onDisconnect is called. * Extension messaging works correctly in out-of-process frames. * Move port lifetime management from renderer to browser. * Tie port lifetime to frames instead of processes. * Only notify frames in renderers if they have accepted the port. * Remove obsolete work-around for crbug.com/520303. * Unify open/close/postMessage logic in ChromeExtensionMessageFilter (crbug.com/394383#c7) - The extension frameId logic is no longer scattered over several files, but resides in a single class (ExtensionApiFrameIdMap). - IDs are now guaranteed to be -1 or higher (before this, -2 was occasionally seen). Depends on https://codereview.chromium.org/1413853005/ BUG=432875 TEST=browser_tests --gtest_filter=\ ExtensionWebRequestApiTest.*:\ WebNavigationApiTest.*:\ ExtensionApiTest.Messaging*:\ ExternallyConnectableMessagingTest.*:\ ExternallyConnectableMessagingWithTlsChannelIdTest.* Review URL: https://codereview.chromium.org/1413543005 Cr-Commit-Position: refs/heads/master@{#367914}
* +isherman for histograms.xmlmfoltz2015-12-121-11/+11
| | | | | | | | | | | | | | | | | | | | +jdufault for chrome/browser/ui/ash Renames CloseRoute() to Terminate() and creates DetachRoute(). This clarifies the role of the two methods invoked on PresentationConnection by plumbing the renaming through the various layers. PresentationConnection.close() -> CloseConnection (PresentationService) -> DetachRoute (MediaRouter) PresentationConnection.terminate() -> Terminate -> TerminateRoute It also removes the mapping for closed and terminated presentations from the PresentationFrame to prevent duplicate invocations of DetachRoute. BUG=540803 Review URL: https://codereview.chromium.org/1507743005 Cr-Commit-Position: refs/heads/master@{#364908}
* chrome.displaySource custom bindingsmikhail.pozdnyakov2015-12-092-0/+42
| | | | | | | | | | | | | | | | | | | | This patch introduces custom bindings for 'chrome.displaySource' API. These are bindings for 'startSession', 'terminateSession' methods and for the 'onSessionStarted', 'onSessionTerminated', 'onSessionErrorOccured' events. The bindings should belong to render process (i.e. be custom) as: 1) they accept dom objects arguments (MediaStreamTrack) 2) for security reasons: to keep all protocols handling within sandbox The abstract 'DisplaySourceSession' class is added to be implemented by the 'chrome.displaySource' API backends. BUG=242107 Review URL: https://codereview.chromium.org/1471243002 Cr-Commit-Position: refs/heads/master@{#364045}
* [MR] Add description field to MediaSink.imcheng2015-12-051-0/+1
| | | | | | | | | | | | | | | | | | description is an optional field on MediaSink which can be used for displaying information on the sink itself in the UI. The sink description will be displayed as a subtext under the sink name. If the sink is currently associated with a route, then the route description is displayed in the subtext instead. Applied conditional stamping to the subtext in media-router-container. Currently, most sinks will not have subtexts in typical usage. BUG=545138 Review URL: https://codereview.chromium.org/1475843002 Cr-Commit-Position: refs/heads/master@{#363314}
* [MR] Fix early return bug in converting connection state in bindings.imcheng2015-11-241-7/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | Some switch statements in presentationConnectionStateToMojo_ are written as: case 'foo': return reallyLongNameThatWouldGoOver80CharsIfOnPrevLine; Unfortunately this is incorrect because semicolons are optional in Javscript. The above statement results in undefined being returned. Mojo then silently converts undefined into the default value when returning to C++, which is CONNECTED. As a result of this, the TERMINATED state is not getting translated correctly. This patch fixes the formatting. We should look into adding test for media_router_bindings.js, or at least add integration tests (after Mounir lands 1466573002) BUG=529893 Review URL: https://codereview.chromium.org/1471423002 Cr-Commit-Position: refs/heads/master@{#361466}
* [Media Router] Add PresentationConnectionStateObserver and related APIs.imcheng2015-11-101-1/+36
| | | | | | | | | | | | | | | | | | Introduce PresentationConnectionStateObserver class to listen for connection state updates from MRPM. Added related MR/MRPM APIs. This is implemented as outlined in the proposal for reworking connection state change listening. Depends on crrev.com/1410143006 BUG=529893 Review URL: https://codereview.chromium.org/1414393009 Cr-Commit-Position: refs/heads/master@{#358855}
* [Extensions] Don't allow built-in extensions code to be overriddenrdevlin.cronin2015-10-2848-98/+101
| | | | | | | | BUG=546677 Review URL: https://codereview.chromium.org/1417513003 Cr-Commit-Position: refs/heads/master@{#356654}
* [Media Router] Implements deferred media sink queries.imcheng2015-10-261-2/+8
| | | | | | | | | | | | | | | | | | | NOTE: taking over mfoltz's original patch at crrev.com/1411003002 Original patch descritpion: Implements deferred media sink queries when no sinks are available. This is a partial implementation of the proposed design for the most common case; it does not yet update the MediaSinksObserver API. There will be no change in behavior until the MRPM side is updated to send the sinks status. BUG=530702 Review URL: https://codereview.chromium.org/1421003003 Cr-Commit-Position: refs/heads/master@{#356180}
* Platform Apps: Disable history.state in platform_app.jsjkummerow2015-10-261-1/+1
| | | | | | | | | | | | | | This is a follow-up to https://codereview.chromium.org/988293002 and makes sure that all blacklisted getters are handled uniformly. The corresponding test (chrome/test/data/extensions/platform_apps/restrictions/main.js) already asserts that history.state is inaccessible. R=haraken@chromium.org BUG=547116 Review URL: https://codereview.chromium.org/1415453003 Cr-Commit-Position: refs/heads/master@{#356040}
* [Media Router] Add speaker group sink icon.apacible2015-10-201-0/+2
| | | | | | | | BUG=541246 Review URL: https://codereview.chromium.org/1414753002 Cr-Commit-Position: refs/heads/master@{#354918}
* Fix a typo in stash_client.jsdcheng2015-10-161-1/+1
| | | | | | | | | | Amazingly enough, this still worked... yay for Javascript? BUG=none Review URL: https://codereview.chromium.org/1413553002 Cr-Commit-Position: refs/heads/master@{#354447}
* [Media Router] Set timeout for route creation.apacible2015-10-061-1/+0
| | | | | | | | | | | | | | This sets a timeout in case of a route creation request that doesn't get a response from the provider. We determined the timeout time, 20s, based on a couple of factors. The default cast timeout is 10s, but there is a way for third party apps to override the timeout, usually using 12s instead. This change also makes the WebUI handle a timeout on route creation. This change also removes is_launching from the MediaSink. We determine which Sink is currently being launched by tracking the ID of the Sink that was clicked in the WebUI. BUG=490372 Review URL: https://codereview.chromium.org/1363593003 Cr-Commit-Position: refs/heads/master@{#352615}
* Remove stash_client.js dependency on unload_event.jsdcheng2015-10-033-38/+3
| | | | | | | | | | | | | | | unload_event is problematic because it runs JS at inopportune times, in the main world. This allows arbitrary web content to run JS at a time when certain invariants in Blink may not hold true. Unfortunately, the mojo version of the serial API depends on stash_client's current implementation. Fortunately, it's not actually used in release yet. BUG=537660 Review URL: https://codereview.chromium.org/1381563007 Cr-Commit-Position: refs/heads/master@{#352231}
* Add public session launch flagkelvinp2015-10-011-0/+1
| | | | | | | | | | | This CL adds a flag to the launchData in chrome.runtime.app.onLaunched to indicate whether the app is being launched in a public session. BUG=508608 Review URL: https://codereview.chromium.org/1375353002 Cr-Commit-Position: refs/heads/master@{#351696}
* [extensions] Remove custom binding dependency on unload_event.js.Daniel Cheng2015-09-301-12/+4
| | | | | | | | | BUG=537666 R=rdevlin.cronin@chromium.org Review URL: https://codereview.chromium.org/1380833002 . Cr-Commit-Position: refs/heads/master@{#351650}
* Finish the implementation of chrome.runtime.getBackgroundClient() for ↵kalman2015-09-181-14/+55
| | | | | | | | | | | | | | | | | | | | | | | | extension service workers. Until now it assumed that the extension's background page was open. Now it uses WakeEventPage IPC call to wake the event page if it's asleep. This required making WakeEventPage thread safe, to be able to be called on a service worker thread, then when the response comes from the browser, call back on that same thread. It was also incorrectly called chrome.getBackgroundClient() rather than chrome.runtime.getBackgroundClient(). I also did a rewrite of the extension service worker tests to be better reusable, and easier to add more tests. It was hard to test a closed event page in the current framework. Then I added more tests. BUG=501569, 532720 R=rdevlin.cronin@chromium.org Review URL: https://codereview.chromium.org/1344243003 Cr-Commit-Position: refs/heads/master@{#349700}
* bindings: Fixes exposed JS APIs for platform apps.yukishiino2015-09-171-6/+7
| | | | | | | | | | | | | | | | | | | We're disabling some of DOM attributes and operations for platform apps. Since event handlers and operations in Window are going to move onto the instance object, we need to update disabling code accordingly. Also fixes a way to disable addEventListener. It's defined on EventTarget.prototype, not on Window.prototype. Also it shouldn't change |this| object. This CL is a preparation of http://crrev.com/1333853002 BUG=43394, 516274 CQ_INCLUDE_TRYBOTS=tryserver.blink:linux_blink_rel Review URL: https://codereview.chromium.org/1333303002 Cr-Commit-Position: refs/heads/master@{#349376}
* Simplify SendRequest of Extension API calls.pneubeck2015-09-111-13/+4
| | | | | | | | | Before, the request id was fetched in a separate native call. Now, the request id is returned by the startRequest function. Review URL: https://codereview.chromium.org/1331063002 Cr-Commit-Position: refs/heads/master@{#348361}
* Add wjmaclean@chromium.org to various guest_view/web_view OWNERS.wjmaclean2015-09-091-0/+1
| | | | | | | | BUG=none Review URL: https://codereview.chromium.org/1333663002 Cr-Commit-Position: refs/heads/master@{#347966}
* [Media Router] Remove obsolete code from media_router_bindings.jsimcheng2015-09-081-23/+0
| | | | | | | | | | | | | - Remove unused functions onRouteResponseError/onRouteResponseReceived - Remove redundant argument from onRoutesUpdated. Note it can be further simplified by removing the input arg if we end up not needing a MediaSink object in a MediaRoute. BUG=527100 Review URL: https://codereview.chromium.org/1323723003 Cr-Commit-Position: refs/heads/master@{#347743}
* [Media Router] Downgrade MediaSink / add for_display in MediaRoute.imcheng2015-09-041-25/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | We don't need to have the full MediaSink in the MediaRoute; only the sink ID is needed for UI purposes. This simplifies the MediaRoute conversion logic in media_router_bindings.js since it no longer has to rely on logic to look up sink name or other hacks. Also add bool for_display to MediaRoute for purpose of selecting proper route to be displayed in UI. This field is to be populated by the provider. Also removed unused mojo converters. There will be a corresponding change to provider manager code to remove the sinks input argument for onRoutesUpdated, and add for_display field to Route. After the providers are updated to populate for_display, the UI logic can be changed to only pass in routes with for_display = true to the WebUI. BUG=510300 Review URL: https://codereview.chromium.org/1325753003 Cr-Commit-Position: refs/heads/master@{#347475}
* [Media Router] Add iconType field to MediaSink.apacible2015-09-031-0/+23
| | | | | | | | | | This adds the iconType field so the Media Router UI can show different icons for each Sink based on its device type. Android will not use iconType, so the Android MediaSinks will always have a "generic" iconType. BUG=526251 Review URL: https://codereview.chromium.org/1313043004 Cr-Commit-Position: refs/heads/master@{#347257}
* Fixing dependencies of the reverted commit of the chrome.i18n.detectLanguage ↵amalika2015-08-241-0/+8
| | | | | | | | | | | | | | | | | | | API. Implementation on the renderer side Please, see Original CL: https://codereview.chromium.org/1208993011/ Reverted: https://codereview.chromium.org/1244343002/ Temp CL we used to figure out deps: https://codereview.chromium.org/1268813004/ Initial patch for detectLanguage API implementation BUG=517628 Review URL: https://codereview.chromium.org/1273903002 Cr-Commit-Position: refs/heads/master@{#345134}
* [Extension ServiceWorkers] Adding getBackgroundClientannekao2015-08-212-0/+27
| | | | | | | | | | After the v8::Context for a service worker is passed up, a script is injected in order for the service worker to have access to the background page of the extension. BUG=501569 Review URL: https://codereview.chromium.org/1304663003 Cr-Commit-Position: refs/heads/master@{#344900}
* Implement the wake-event-page internal extension API.kalman2015-08-211-0/+5
| | | | | | | | | | | | | | | | | This is implemented purely using IPC because it will be used from worker contexts, which don't have access to extension bindings. The next step will be to add worker thread support so the renderer side is structured to easily accommodate for that, once the public content API is chaned to allow it. It will be used in the public chrome.runtime.getBackgroundClient() exposed to service workers. BUG=501569 R=rdevlin.cronin@chromium.org, palmer@chromium.org Review URL: https://codereview.chromium.org/1294993004 Cr-Commit-Position: refs/heads/master@{#344834}
* [Media Router] Add OnPresentationSessionDetached to MediaRouter API.imcheng2015-08-211-0/+16
| | | | | | | | | | | | | | | | | | | | | | OnPresentationSessionDetached() will be closed to notify the provider that a presentation session has been detached from the underlying MediaRoute due to garbage collection, navigation, etc., but not due to an explicit close() call. This patch introduces the API to MediaRouter and bindings. Note that a corresponding patch to add the API to the extension is required. In addition, this patch hooks up OnPresentationSessionDetached calls from PSDImpl::PresentationFrame::Reset(), which is called when the frame navigates or is about to be deleted. BUG=512930 TBR=avayvod@chromium.org Review URL: https://codereview.chromium.org/1302973003 Cr-Commit-Position: refs/heads/master@{#344768}
* [Media Router] Implement stopListeningForRouteMessages.imcheng2015-08-211-5/+23
| | | | | | | | | | | | | | | | | | | | | | | | NOTE: This continues from https://codereview.chromium.org/1298163003/ since I wanted to upload this patch using my @chromium.org acct. stopListeningForRouteMessages for media_router.mojom serves to resolve the outstanding Mojo callback for a given listenForRouteMessages call. When the call is received, the outstanding callback/promise will be resolved with an empty list. We also change the semantics of return value of listenForRouteMessages to return an additional bool to indicate whether a permanent error occurred. In cases where |error| is true, MRMojoImpl will stop asking for next batch of msgs for that route. Note: this patch should be landed around the same time as the patch that implements stopListeningForRouteMessages in extension. BUG=520204 Review URL: https://codereview.chromium.org/1307723002 Cr-Commit-Position: refs/heads/master@{#344703}
* [Media Router OWNERS] Add imcheng@ to Media Router related OWNERS.imcheng2015-08-201-1/+2
| | | | | | | | | | Added imcheng@chromium.org to following OWNERs: chrome/browser/media/router extensions/renderer/resources/media_router_bindings.js Review URL: https://codereview.chromium.org/1296953004 Cr-Commit-Position: refs/heads/master@{#344544}
* [MediaRouter]Pass in one route ID to extension for listenForRouteMessageshaibinlu2015-08-201-1/+1
| | | | | | | | BUG= Review URL: https://codereview.chromium.org/1305453004 Cr-Commit-Position: refs/heads/master@{#344540}