Commit 04ed07f2 authored by calamity's avatar calamity Committed by Commit bot

Enable right clicking on the applist doodle web contents and log the data.

This CL enables the context menu on the doodle web contents and logs
the received doodle data. This will be reverted in a future patch
once an issue with the doodle not displaying is diagnosed.

BUG=462082

Review URL: https://codereview.chromium.org/961553002

Cr-Commit-Position: refs/heads/master@{#318198}
parent 4cf03c77
......@@ -16,6 +16,10 @@ cr.define('appList.startPage', function() {
// The element containing the current Google Doodle.
var doodle = null;
// TODO(calamity): This is used for manual inspection of the doodle data.
// Remove this once http://crbug.com/462082 is diagnosed.
var doodleData = null;
/**
* Initialize the page.
*/
......@@ -84,6 +88,7 @@ cr.define('appList.startPage', function() {
}
var doodleData = data.ddljson;
this.doodleData = doodleData;
if (!doodleData || !doodleData.transparent_large_image) {
setDoodleVisible(false);
return;
......@@ -152,5 +157,6 @@ cr.define('appList.startPage', function() {
};
});
document.addEventListener('contextmenu', function(e) { e.preventDefault(); });
// TODO(calamity): Suppress context the menu once http://crbug.com/462082 is
// diagnosed.
document.addEventListener('DOMContentLoaded', appList.startPage.initialize);
......@@ -566,6 +566,15 @@ void StartPageService::DidNavigateMainFrame(
ui_zoom::ZoomController::FromWebContents(contents_.get())->SetZoomLevel(0);
}
void StartPageService::RenderProcessGone(base::TerminationStatus status) {
// TODO(calamity): Remove this log after http://crbug.com/462082 is diagnosed.
if (status == base::TERMINATION_STATUS_ABNORMAL_TERMINATION ||
status == base::TERMINATION_STATUS_PROCESS_WAS_KILLED ||
status == base::TERMINATION_STATUS_PROCESS_CRASHED) {
LOG(WARNING) << "App list doodle contents crashed with status " << status;
}
}
void StartPageService::WebUILoaded() {
// There's a race condition between the WebUI loading, and calling its JS
// functions. Specifically, calling LoadContents() doesn't mean that the page
......
......@@ -142,6 +142,8 @@ class StartPageService : public KeyedService,
void DidNavigateMainFrame(
const content::LoadCommittedDetails& details,
const content::FrameNavigateParams& params) override;
void RenderProcessGone(base::TerminationStatus status) override;
// Change the known microphone availability. |available| should be true if
// the microphone exists and is available for use.
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment