Feature detection-friendly restrictions for packaged apps.

Packaged apps do not have access to some features of the Web platform
that are deprecated, or that do not make sense in the context of an
app. Currently, accessing most of those features throws an error.

This change makes thse features behave more like missing featurs on the
Web platform. Whenever possible, accessing restricted features returns
undefined and logs an error to the browser console. Features accessible
via non-configurable ES5 properties (e.g. window.alert, document.write)
either become no-ops or throw errors, on a case-by-case basis.

Deprecated events have their "on*" properties return undefined (as
opposed to null, for events with no handlers) to facilitate feature
detection. Using addEventListener for these events used to throw an
error, and now logs an error to the console and turns into a no-op, to
mimic the behavior for undefined events as well as possible.

This change aims to make JavaScript libraries written for browsers work
in packaged apps as seamlessly as possible, while still providing useful
warnings for developers. This creates a couple of warts: (1) properties
are not removed, so the "in" operator will still see them, and (2)
dispatchEvent will never deliver deprecated events, but it normally
delives un-implemented events.

BUG=330487

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@243817 0039d316-1c4b-4281-b951-d872f2087c98
OpaqueBrowserFrameViewPlatformSpecific::Create no longer returns NULL.

This avoids duplicating the default logic for all of its methods.
Previously, every time a method was called, we had to test for NULL and
assume the default value for that method (even though the default method
implementation already exists; it was never used). Now the caller
assumes platform_observer_ is non-NULL (via a DCHECK) and it is the base
class's responsibility to provide default methods.

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@243819 0039d316-1c4b-4281-b951-d872f2087c98
SVN changes up to revision 243819