Fix NULL deref in SelectFileDialogImpl when a NULL filter is provided.
According to the documentation, NULL is a valid value but the code
wasn't consistently checking for it.

BUG=337068
TEST=See repro steps in the bug.

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@246647 0039d316-1c4b-4281-b951-d872f2087c98
Mojo: Make the bindings generator able to dynamically load a generator.

Notes:
- Currently --generators=.../generators/mojom_cpp_generator.py won't
  work; the python module path won't be right for it to just do "import
  mojom" (etc.). Instead, an explicitly-specified generator would have
  to do something like "from generators import mojom".
- @UseJinja's path_to_template argument is now relative to the directory
  containing the *caller's* file (i.e., the generator's file), not the
  directory containing template_expander.py.

Still to do:
- Factory out the generator "library" files to a separate directory,
  away from specific (e.g., C++) generators. (Maybe move all the
  libraries into a pylib/ directory, and add that directory to the
  module path.)
- Make it so that --generators=.../mojom_cpp_generator.py works as
  expected.

R=davemoore@chromium.org

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@246649 0039d316-1c4b-4281-b951-d872f2087c98
mac: Fix a bug that prevented bookmark drag-and-drop.

In scenarios where a bookmark folder contains so many items that not all can be
simultaneously shown (the rest are hidden beneath the fold and can be accessed
by a black down arrow), attempting to drag-and-drop would always fail. This is
because the cursor's position was being passed in as window coordinates, but
was being used as if it were in local coordinates. As a result, attempting to
hover over a bookmark folder would fail to expand the folder. Instead, another
folder would be expanded. If that folder was below the fold, then the user
would not see any folder expansion. Furthermore, users would not be able to
drop the bookmark onto the desired folder.


BUG=132850
TEST=Make sure the bookmark bar is showing. Create a folder under Bookmarks Bar
called 'temp'. Inside of 'temp', create ~150 subfolders called 'temp2'. When
you click on 'temp' in the bookmark bar, there should be so many items that
only the top items show up (the bottom items are beneath the fold and can be
accessed by a black down arrow). Now try to drag-and-drop a bookmark into one
of the 'temp2' folders.  Prior to this change, it would be impossible to drop
the bookmark into the 'temp2' folder. After this change, drag-and-drop should
work as expected.

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

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