ash: Add launcher overflow bubble.

- Host a LauncherView in bubble to display overflown items;
- Mouse wheel and two-finger scroll to scroll the LauncherView in bubble in case overflow bubble is overflown;
- Fit bubble when items are added/removed;
- Keep launcher bar on screen when the bubble is shown;

BUG=128054
TEST=Verify launcher overflown items are in a bubble instead of menu.


Review URL: https://chromiumcodereview.appspot.com/10659003

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@146460 0039d316-1c4b-4281-b951-d872f2087c98
void ShelfLayoutManager::UpdateVisibilityState() {
  ShellDelegate* delegate = Shell::GetInstance()->delegate();
  if (delegate && delegate->IsScreenLocked()) {
    SetState(VISIBLE);
  } else {
    WorkspaceManager::WindowState window_state(
        workspace_manager_->GetWindowState());
    switch (window_state) {
      case WorkspaceManager::WINDOW_STATE_FULL_SCREEN:
        SetState(HIDDEN);
        break;

      case WorkspaceManager::WINDOW_STATE_MAXIMIZED:
        SetState(auto_hide_behavior_ != SHELF_AUTO_HIDE_BEHAVIOR_NEVER ?
                 AUTO_HIDE : VISIBLE);
        break;

      case WorkspaceManager::WINDOW_STATE_WINDOW_OVERLAPS_SHELF:
      case WorkspaceManager::WINDOW_STATE_DEFAULT:
        SetState(auto_hide_behavior_ == SHELF_AUTO_HIDE_BEHAVIOR_ALWAYS ?
                 AUTO_HIDE : VISIBLE);
        SetWindowOverlapsShelf(window_state ==
            WorkspaceManager::WINDOW_STATE_WINDOW_OVERLAPS_SHELF);
    }
  }
}

void ShelfLayoutManager::UpdateVisibilityState() {
  ShellDelegate* delegate = Shell::GetInstance()->delegate();
  if (delegate && delegate->IsScreenLocked()) {
    SetState(VISIBLE);
  } else {
    WorkspaceManager::WindowState window_state(
        workspace_manager_->GetWindowState());
    switch (window_state) {
      case WorkspaceManager::WINDOW_STATE_FULL_SCREEN:
        SetState(HIDDEN);
        break;

      case WorkspaceManager::WINDOW_STATE_MAXIMIZED:
        SetState(auto_hide_behavior_ != SHELF_AUTO_HIDE_BEHAVIOR_NEVER ?
                 AUTO_HIDE : VISIBLE);
        break;

      case WorkspaceManager::WINDOW_STATE_WINDOW_OVERLAPS_SHELF:
      case WorkspaceManager::WINDOW_STATE_DEFAULT:
        SetState(auto_hide_behavior_ == SHELF_AUTO_HIDE_BEHAVIOR_ALWAYS ?
                 AUTO_HIDE : VISIBLE);
        SetWindowOverlapsShelf(window_state ==
            WorkspaceManager::WINDOW_STATE_WINDOW_OVERLAPS_SHELF);
    }
  }
}
