Do not add extension items to panel's context menu if extension is not present.

When the panel is navigated to a url outside of the extension's package, the
RenderViewHost isn't associated with the extension, so it will return NULL when
calling GetExtensionForRenderViewHost. This will cause a crash when
right-clicking a panel or detached panel (with a url outside of the extension's
page).

BUG=168998
TEST=1. Please refer to the crbug.com/168998 and load the attached extension in
crbug.com/168998#c4 .

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@227864 0039d316-1c4b-4281-b951-d872f2087c98
Fixes a crash issue of Win caused by not detaching IME.

There is a case that RWHV_Win doesn't detach from a IME, and it causes a crash later.
This CL makes sure that RWHV_Win detaches from a IME before its destruction.

BUG=301516
TEST=Done manually.

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

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