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

Side by Side Diff: mash/shelf/shelf_view.cc

Issue 1674903003: Extract shell methods from ApplicationImpl into a base class, and pass this to Initialize() instead. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@mojom
Patch Set: . Created 4 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « mash/shelf/shelf_view.h ('k') | mash/shell/shell_application_delegate.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "mash/shelf/shelf_view.h" 5 #include "mash/shelf/shelf_view.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 8
9 #include "base/auto_reset.h" 9 #include "base/auto_reset.h"
10 #include "mash/shelf/shelf_button.h" 10 #include "mash/shelf/shelf_button.h"
(...skipping 212 matching lines...) Expand 10 before | Expand all | Expand 10 after
223 view_->layer()->SetOpacity(1.0f); 223 view_->layer()->SetOpacity(1.0f);
224 } 224 }
225 225
226 private: 226 private:
227 ShelfView* shelf_view_; 227 ShelfView* shelf_view_;
228 views::View* view_; 228 views::View* view_;
229 229
230 DISALLOW_COPY_AND_ASSIGN(StartFadeAnimationDelegate); 230 DISALLOW_COPY_AND_ASSIGN(StartFadeAnimationDelegate);
231 }; 231 };
232 232
233 ShelfView::ShelfView(mojo::ApplicationImpl* app) 233 ShelfView::ShelfView(mojo::Shell* shell)
234 : app_(app), 234 : shell_(shell),
235 model_(app), 235 model_(shell),
236 alignment_(SHELF_ALIGNMENT_BOTTOM), 236 alignment_(SHELF_ALIGNMENT_BOTTOM),
237 first_visible_index_(0), 237 first_visible_index_(0),
238 last_visible_index_(-1), 238 last_visible_index_(-1),
239 /* TODO(msw): Restore functionality: 239 /* TODO(msw): Restore functionality:
240 overflow_button_(nullptr), 240 overflow_button_(nullptr),
241 owner_overflow_bubble_(nullptr),*/ 241 owner_overflow_bubble_(nullptr),*/
242 tooltip_(this), 242 tooltip_(this),
243 drag_pointer_(NONE), 243 drag_pointer_(NONE),
244 drag_view_(nullptr), 244 drag_view_(nullptr),
245 start_drag_index_(-1), 245 start_drag_index_(-1),
(...skipping 1658 matching lines...) Expand 10 before | Expand all | Expand 10 after
1904 break; 1904 break;
1905 case SHELF_ALIGNMENT_TOP: 1905 case SHELF_ALIGNMENT_TOP:
1906 distance = coordinate.y() - bounds.bottom(); 1906 distance = coordinate.y() - bounds.bottom();
1907 break; 1907 break;
1908 } 1908 }
1909 return distance > 0 ? distance : 0; 1909 return distance > 0 ? distance : 0;
1910 } 1910 }
1911 1911
1912 } // namespace shelf 1912 } // namespace shelf
1913 } // namespace mash 1913 } // namespace mash
OLDNEW
« no previous file with comments | « mash/shelf/shelf_view.h ('k') | mash/shell/shell_application_delegate.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698