OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 "chrome/browser/ui/views/extensions/media_galleries_dialog_views.h" | 5 #include "chrome/browser/ui/views/extensions/media_galleries_dialog_views.h" |
6 | 6 |
7 #include "base/strings/utf_string_conversions.h" | 7 #include "base/strings/utf_string_conversions.h" |
8 #include "chrome/browser/ui/views/constrained_window_views.h" | 8 #include "chrome/browser/ui/views/constrained_window_views.h" |
9 #include "chrome/browser/ui/views/extensions/media_gallery_checkbox_view.h" | 9 #include "chrome/browser/ui/views/extensions/media_gallery_checkbox_view.h" |
10 #include "chrome/grit/generated_resources.h" | 10 #include "chrome/grit/generated_resources.h" |
(...skipping 20 matching lines...) Expand all Loading... |
31 namespace { | 31 namespace { |
32 | 32 |
33 const int kScrollAreaHeight = 192; | 33 const int kScrollAreaHeight = 192; |
34 | 34 |
35 // This container has the right Layout() impl to use within a ScrollView. | 35 // This container has the right Layout() impl to use within a ScrollView. |
36 class ScrollableView : public views::View { | 36 class ScrollableView : public views::View { |
37 public: | 37 public: |
38 ScrollableView() {} | 38 ScrollableView() {} |
39 virtual ~ScrollableView() {} | 39 virtual ~ScrollableView() {} |
40 | 40 |
41 virtual void Layout() OVERRIDE; | 41 virtual void Layout() override; |
42 | 42 |
43 private: | 43 private: |
44 DISALLOW_COPY_AND_ASSIGN(ScrollableView); | 44 DISALLOW_COPY_AND_ASSIGN(ScrollableView); |
45 }; | 45 }; |
46 | 46 |
47 void ScrollableView::Layout() { | 47 void ScrollableView::Layout() { |
48 gfx::Size pref = GetPreferredSize(); | 48 gfx::Size pref = GetPreferredSize(); |
49 int width = pref.width(); | 49 int width = pref.width(); |
50 int height = pref.height(); | 50 int height = pref.height(); |
51 if (parent()) { | 51 if (parent()) { |
(...skipping 273 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
325 return controller_->WebContents() != NULL; | 325 return controller_->WebContents() != NULL; |
326 } | 326 } |
327 | 327 |
328 // MediaGalleriesDialogViewsController ----------------------------------------- | 328 // MediaGalleriesDialogViewsController ----------------------------------------- |
329 | 329 |
330 // static | 330 // static |
331 MediaGalleriesDialog* MediaGalleriesDialog::Create( | 331 MediaGalleriesDialog* MediaGalleriesDialog::Create( |
332 MediaGalleriesDialogController* controller) { | 332 MediaGalleriesDialogController* controller) { |
333 return new MediaGalleriesDialogViews(controller); | 333 return new MediaGalleriesDialogViews(controller); |
334 } | 334 } |
OLD | NEW |