Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(81)

Issue 9403035: Refactor intra-strip panel drags by introducing PanelDragController. (Closed)

Created:
8 years, 10 months ago by jianli
Modified:
8 years, 10 months ago
Reviewers:
jennb, Andrei
CC:
chromium-reviews, jennb, jianli, Dmitry Titov, dcheng, prasadt
Visibility:
Public.

Description

Refactor intra-strip panel drags by introducing PanelDragController. Changes: 1) Add PanelDragController that is created and owned by PanelManager. Currently it only contains the logic for intra-strip drags. 2) Add dragging related base methods to PanelStrip. 3) PanelManager dragging methods will now call PanelDragController and then delegate to PanelStrip methods. 4) Add delta_y parameter to Drag method. 5) Remove is_draggble from Panel and replace it with PanelStrip::CanDragPanel. BUG=none TEST=new tests to cover detached panels Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=122914

Patch Set 1 #

Patch Set 2 : Fix trybot #

Total comments: 16

Patch Set 3 : Fix per feedback #

Total comments: 2

Patch Set 4 : Fix per feedback #

Total comments: 32

Patch Set 5 : Fix per feedback #

Total comments: 9

Patch Set 6 : Final patch for commit #

Unified diffs Side-by-side diffs Delta from patch set Stats (+336 lines, -75 lines) Patch
A chrome/browser/ui/panels/detached_panel_browsertest.cc View 1 2 3 4 1 chunk +90 lines, -0 lines 0 comments Download
M chrome/browser/ui/panels/detached_panel_strip.h View 1 2 3 4 2 chunks +5 lines, -0 lines 0 comments Download
M chrome/browser/ui/panels/detached_panel_strip.cc View 1 2 3 4 2 chunks +23 lines, -0 lines 0 comments Download
M chrome/browser/ui/panels/docked_panel_strip.h View 1 2 3 4 4 chunks +7 lines, -10 lines 0 comments Download
M chrome/browser/ui/panels/docked_panel_strip.cc View 1 2 3 4 5 12 chunks +25 lines, -33 lines 0 comments Download
M chrome/browser/ui/panels/overflow_panel_strip.h View 1 2 3 4 1 chunk +4 lines, -0 lines 0 comments Download
M chrome/browser/ui/panels/overflow_panel_strip.cc View 1 2 3 4 2 chunks +17 lines, -1 line 0 comments Download
M chrome/browser/ui/panels/panel.h View 1 2 3 4 2 chunks +1 line, -5 lines 0 comments Download
M chrome/browser/ui/panels/panel.cc View 1 2 3 4 2 chunks +4 lines, -1 line 0 comments Download
M chrome/browser/ui/panels/panel_browser_view.cc View 1 2 3 4 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/ui/panels/panel_browser_window_gtk.cc View 1 2 3 4 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/ui/panels/panel_browsertest.cc View 1 4 2 chunks +4 lines, -1 line 0 comments Download
A chrome/browser/ui/panels/panel_drag_controller.h View 1 2 3 4 5 1 chunk +45 lines, -0 lines 0 comments Download
A chrome/browser/ui/panels/panel_drag_controller.cc View 1 2 3 4 5 1 chunk +40 lines, -0 lines 0 comments Download
M chrome/browser/ui/panels/panel_manager.h View 1 2 3 4 5 chunks +16 lines, -3 lines 0 comments Download
M chrome/browser/ui/panels/panel_manager.cc View 1 2 3 4 5 4 chunks +18 lines, -5 lines 0 comments Download
M chrome/browser/ui/panels/panel_strip.h View 1 2 3 4 1 chunk +10 lines, -0 lines 0 comments Download
M chrome/browser/ui/panels/panel_titlebar_view_cocoa.h View 1 chunk +2 lines, -1 line 0 comments Download
M chrome/browser/ui/panels/panel_titlebar_view_cocoa.mm View 3 chunks +8 lines, -4 lines 0 comments Download
M chrome/browser/ui/panels/panel_window_controller_cocoa.h View 1 chunk +2 lines, -1 line 0 comments Download
M chrome/browser/ui/panels/panel_window_controller_cocoa.mm View 1 2 3 4 1 chunk +3 lines, -2 lines 0 comments Download
M chrome/chrome_browser.gypi View 2 chunks +8 lines, -6 lines 0 comments Download
M chrome/chrome_tests.gypi View 1 2 2 chunks +2 lines, -0 lines 0 comments Download

Messages

Total messages: 17 (0 generated)
jianli
8 years, 10 months ago (2012-02-16 01:08:59 UTC) #1
jianli
8 years, 10 months ago (2012-02-16 21:43:37 UTC) #2
jennb
Initial round of comments, mostly about class interface/interactions. https://chromiumcodereview.appspot.com/9403035/diff/5001/chrome/browser/ui/panels/detached_panel_strip.h File chrome/browser/ui/panels/detached_panel_strip.h (right): https://chromiumcodereview.appspot.com/9403035/diff/5001/chrome/browser/ui/panels/detached_panel_strip.h#newcode58 chrome/browser/ui/panels/detached_panel_strip.h:58: Panel* ...
8 years, 10 months ago (2012-02-16 22:31:00 UTC) #3
jianli
https://chromiumcodereview.appspot.com/9403035/diff/5001/chrome/browser/ui/panels/detached_panel_strip.h File chrome/browser/ui/panels/detached_panel_strip.h (right): https://chromiumcodereview.appspot.com/9403035/diff/5001/chrome/browser/ui/panels/detached_panel_strip.h#newcode58 chrome/browser/ui/panels/detached_panel_strip.h:58: Panel* dragging_panel_; On 2012/02/16 22:31:00, jennb wrote: > This ...
8 years, 10 months ago (2012-02-16 23:05:52 UTC) #4
Andrei
https://chromiumcodereview.appspot.com/9403035/diff/5003/chrome/browser/ui/panels/detached_panel_strip.cc File chrome/browser/ui/panels/detached_panel_strip.cc (right): https://chromiumcodereview.appspot.com/9403035/diff/5003/chrome/browser/ui/panels/detached_panel_strip.cc#newcode110 chrome/browser/ui/panels/detached_panel_strip.cc:110: } It looks like cancelling the drag will happen ...
8 years, 10 months ago (2012-02-17 00:08:18 UTC) #5
jianli
https://chromiumcodereview.appspot.com/9403035/diff/5003/chrome/browser/ui/panels/detached_panel_strip.cc File chrome/browser/ui/panels/detached_panel_strip.cc (right): https://chromiumcodereview.appspot.com/9403035/diff/5003/chrome/browser/ui/panels/detached_panel_strip.cc#newcode110 chrome/browser/ui/panels/detached_panel_strip.cc:110: } On 2012/02/17 00:08:18, Andrei wrote: > It looks ...
8 years, 10 months ago (2012-02-17 00:15:12 UTC) #6
jennb
https://chromiumcodereview.appspot.com/9403035/diff/13001/chrome/browser/ui/panels/detached_panel_browsertest.cc File chrome/browser/ui/panels/detached_panel_browsertest.cc (right): https://chromiumcodereview.appspot.com/9403035/diff/13001/chrome/browser/ui/panels/detached_panel_browsertest.cc#newcode31 chrome/browser/ui/panels/detached_panel_browsertest.cc:31: EXPECT_EQ(2, detached_strip->num_panels()); Also check panel_manager->panels() includes the detached panels. ...
8 years, 10 months ago (2012-02-17 21:28:45 UTC) #7
jianli
http://codereview.chromium.org/9403035/diff/13001/chrome/browser/ui/panels/detached_panel_browsertest.cc File chrome/browser/ui/panels/detached_panel_browsertest.cc (right): http://codereview.chromium.org/9403035/diff/13001/chrome/browser/ui/panels/detached_panel_browsertest.cc#newcode31 chrome/browser/ui/panels/detached_panel_browsertest.cc:31: EXPECT_EQ(2, detached_strip->num_panels()); On 2012/02/17 21:28:45, jennb wrote: > Also ...
8 years, 10 months ago (2012-02-17 23:52:56 UTC) #8
Andrei
https://chromiumcodereview.appspot.com/9403035/diff/13029/chrome/browser/ui/panels/panel_manager.cc File chrome/browser/ui/panels/panel_manager.cc (right): https://chromiumcodereview.appspot.com/9403035/diff/13029/chrome/browser/ui/panels/panel_manager.cc#newcode113 chrome/browser/ui/panels/panel_manager.cc:113: overflow_strip_->SetDisplayArea(overflow_area); Should not we take care of the detached ...
8 years, 10 months ago (2012-02-18 19:41:30 UTC) #9
Andrei
https://chromiumcodereview.appspot.com/9403035/diff/13029/chrome/browser/ui/panels/panel_manager.cc File chrome/browser/ui/panels/panel_manager.cc (right): https://chromiumcodereview.appspot.com/9403035/diff/13029/chrome/browser/ui/panels/panel_manager.cc#newcode151 chrome/browser/ui/panels/panel_manager.cc:151: overflow_strip_->OnFullScreenModeChanged(is_full_screen_); Notify the detached strip here as well https://chromiumcodereview.appspot.com/9403035/diff/13029/chrome/browser/ui/panels/panel_manager.cc#newcode247 ...
8 years, 10 months ago (2012-02-18 21:31:12 UTC) #10
jianli
https://chromiumcodereview.appspot.com/9403035/diff/13029/chrome/browser/ui/panels/panel_manager.cc File chrome/browser/ui/panels/panel_manager.cc (right): https://chromiumcodereview.appspot.com/9403035/diff/13029/chrome/browser/ui/panels/panel_manager.cc#newcode179 chrome/browser/ui/panels/panel_manager.cc:179: docked_strip_->OnPanelExpansionStateChanged(panel); On 2012/02/18 19:41:31, Andrei wrote: > Should it ...
8 years, 10 months ago (2012-02-21 19:14:32 UTC) #11
Andrei
On 2012/02/21 19:14:32, jianli wrote: > https://chromiumcodereview.appspot.com/9403035/diff/13029/chrome/browser/ui/panels/panel_manager.cc > File chrome/browser/ui/panels/panel_manager.cc (right): > > https://chromiumcodereview.appspot.com/9403035/diff/13029/chrome/browser/ui/panels/panel_manager.cc#newcode179 > ...
8 years, 10 months ago (2012-02-21 19:19:43 UTC) #12
jennb
LGTM http://codereview.chromium.org/9403035/diff/13029/chrome/browser/ui/panels/docked_panel_strip.cc File chrome/browser/ui/panels/docked_panel_strip.cc (right): http://codereview.chromium.org/9403035/diff/13029/chrome/browser/ui/panels/docked_panel_strip.cc#newcode221 chrome/browser/ui/panels/docked_panel_strip.cc:221: if (panel_manager_->drag_controller()->dragging_panel()) { nit: should there be a ...
8 years, 10 months ago (2012-02-21 20:01:46 UTC) #13
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/jianli@chromium.org/9403035/21007
8 years, 10 months ago (2012-02-21 21:05:13 UTC) #14
commit-bot: I haz the power
Try job failure for 9403035-21007 (retry) on linux_rel for step "ui_tests". It's a second try, ...
8 years, 10 months ago (2012-02-21 22:12:11 UTC) #15
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/jianli@chromium.org/9403035/21007
8 years, 10 months ago (2012-02-21 22:18:43 UTC) #16
commit-bot: I haz the power
8 years, 10 months ago (2012-02-21 23:46:02 UTC) #17
Change committed as 122914

Powered by Google App Engine
This is Rietveld 408576698