| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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/toolbar/browser_actions_container.h" | 5 #include "chrome/browser/ui/views/toolbar/browser_actions_container.h" |
| 6 | 6 |
| 7 #include "base/compiler_specific.h" | 7 #include "base/compiler_specific.h" |
| 8 #include "base/stl_util.h" | 8 #include "base/stl_util.h" |
| 9 #include "chrome/browser/extensions/tab_helper.h" | 9 #include "chrome/browser/extensions/tab_helper.h" |
| 10 #include "chrome/browser/profiles/profile.h" | 10 #include "chrome/browser/profiles/profile.h" |
| (...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 62 | 62 |
| 63 //////////////////////////////////////////////////////////////////////////////// | 63 //////////////////////////////////////////////////////////////////////////////// |
| 64 // BrowserActionsContainer | 64 // BrowserActionsContainer |
| 65 | 65 |
| 66 // static | 66 // static |
| 67 bool BrowserActionsContainer::disable_animations_during_testing_ = false; | 67 bool BrowserActionsContainer::disable_animations_during_testing_ = false; |
| 68 | 68 |
| 69 BrowserActionsContainer::BrowserActionsContainer( | 69 BrowserActionsContainer::BrowserActionsContainer( |
| 70 Browser* browser, | 70 Browser* browser, |
| 71 BrowserActionsContainer* main_container) | 71 BrowserActionsContainer* main_container) |
| 72 : toolbar_actions_bar_(new ToolbarActionsBar(this, | 72 : toolbar_actions_bar_(new ToolbarActionsBar( |
| 73 browser, | 73 this, |
| 74 main_container != nullptr)), | 74 browser, |
| 75 main_container ? |
| 76 main_container->toolbar_actions_bar_.get() : nullptr)), |
| 75 browser_(browser), | 77 browser_(browser), |
| 76 main_container_(main_container), | 78 main_container_(main_container), |
| 77 popup_owner_(NULL), | 79 popup_owner_(NULL), |
| 78 container_width_(0), | 80 container_width_(0), |
| 79 resize_area_(NULL), | 81 resize_area_(NULL), |
| 80 chevron_(NULL), | 82 chevron_(NULL), |
| 81 suppress_chevron_(false), | 83 suppress_chevron_(false), |
| 82 added_to_view_(false), | 84 added_to_view_(false), |
| 83 resize_amount_(0), | 85 resize_amount_(0), |
| 84 animation_target_size_(0) { | 86 animation_target_size_(0) { |
| (...skipping 670 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 755 | 757 |
| 756 ui::ThemeProvider* tp = GetThemeProvider(); | 758 ui::ThemeProvider* tp = GetThemeProvider(); |
| 757 if (tp && chevron_) { | 759 if (tp && chevron_) { |
| 758 chevron_->SetImage(views::Button::STATE_NORMAL, | 760 chevron_->SetImage(views::Button::STATE_NORMAL, |
| 759 *tp->GetImageSkiaNamed(IDR_BROWSER_ACTIONS_OVERFLOW)); | 761 *tp->GetImageSkiaNamed(IDR_BROWSER_ACTIONS_OVERFLOW)); |
| 760 } | 762 } |
| 761 | 763 |
| 762 const int kImages[] = IMAGE_GRID(IDR_DEVELOPER_MODE_HIGHLIGHT); | 764 const int kImages[] = IMAGE_GRID(IDR_DEVELOPER_MODE_HIGHLIGHT); |
| 763 highlight_painter_.reset(views::Painter::CreateImageGridPainter(kImages)); | 765 highlight_painter_.reset(views::Painter::CreateImageGridPainter(kImages)); |
| 764 } | 766 } |
| OLD | NEW |