Open links in correct profile if we are the system default browser.

When a link is clicked in a packaged app it will be launched into the
system default browser. This change adds detection logic to see if
we are the default browser, and if so, open the URL directly without
going through the system handler to launch externally.

BUG=337022
TEST=Manual testing needed for all platforms:
- Find helper app http://crbug.com/337022#c9
- Test with both Chrome as default and non default browser
1. Open multiple profile windows
2. Load and Launch app from one profile (chrome://extensions, developer mode)
3. Activate another profile's window
4. Click on link in app, verify that link is opened in correct profile
   (old behavior would open link in last active browser window, wrong profile)

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@249764 0039d316-1c4b-4281-b951-d872f2087c98
Do not show 'Minimize' item if the window cann't be maximized.

This is because WidgetDelegate does not have a CanMinimize() method and
some code depends on this to make sure that the minimize item isn't
shown when it should not. The right fix would be to introduce a
CanMinimize() method in WidgetDelegate but we need to fix the regression
first.

BUG=341010

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@249765 0039d316-1c4b-4281-b951-d872f2087c98
Fix SyncedNotification tags in Python test server

This CL removes the incorrect setting of server_defined_unique_tag
for SyncedNotification entries in the Sync Python test server. Only one
of the client/server tags should be set.

Two other no-op changes were also made in the server (fix documentation
and indentation).

BUG=248332

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@249766 0039d316-1c4b-4281-b951-d872f2087c98
SVN changes up to revision 249765
Revert 249756 "Attempt to fix crash in base::android::MethodID::..."
Reason: bug pointed out in codereview after CQ box was checked failed to stop the CQ from landing the patch.

> Attempt to fix crash in base::android::MethodID::Get()
> 
> BUG=336600
> 
> Review URL: https://codereview.chromium.org/156353003

TBR=henrika@chromium.org

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@249767 0039d316-1c4b-4281-b951-d872f2087c98
SVN changes up to revision 249766
Use validating form of IPC enum macros for geolocation messages.

This is part of a long-running background task to remove the remaining
uses of the unchecked IPC_ENUM_TRAITS() macro.

BUG=246708

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

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