| 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 431 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 442 index_in_row * ToolbarActionsBar::IconWidth(true), | 442 index_in_row * ToolbarActionsBar::IconWidth(true), |
| 443 row_index * ToolbarActionsBar::IconHeight(), | 443 row_index * ToolbarActionsBar::IconHeight(), |
| 444 ToolbarActionsBar::IconWidth(false), | 444 ToolbarActionsBar::IconWidth(false), |
| 445 ToolbarActionsBar::IconHeight()); | 445 ToolbarActionsBar::IconHeight()); |
| 446 view->SetVisible(true); | 446 view->SetVisible(true); |
| 447 } | 447 } |
| 448 } | 448 } |
| 449 } | 449 } |
| 450 | 450 |
| 451 void BrowserActionsContainer::OnMouseEntered(const ui::MouseEvent& event) { | 451 void BrowserActionsContainer::OnMouseEntered(const ui::MouseEvent& event) { |
| 452 if (!shown_bubble_ && !toolbar_action_views_.empty()) { | 452 if (!shown_bubble_ && !toolbar_action_views_.empty() && |
| 453 toolbar_actions_bar_->ShouldShowInfoBubble()) { |
| 453 ExtensionToolbarIconSurfacingBubble* bubble = | 454 ExtensionToolbarIconSurfacingBubble* bubble = |
| 454 new ExtensionToolbarIconSurfacingBubble(toolbar_action_views_[0], | 455 new ExtensionToolbarIconSurfacingBubble(toolbar_action_views_[0], |
| 455 toolbar_actions_bar_.get()); | 456 toolbar_actions_bar_.get()); |
| 456 views::BubbleDelegateView::CreateBubble(bubble); | 457 views::BubbleDelegateView::CreateBubble(bubble); |
| 457 bubble->GetWidget()->Show(); | 458 bubble->GetWidget()->Show(); |
| 458 } | 459 } |
| 459 shown_bubble_ = true; | 460 shown_bubble_ = true; |
| 460 } | 461 } |
| 461 | 462 |
| 462 bool BrowserActionsContainer::GetDropFormats( | 463 bool BrowserActionsContainer::GetDropFormats( |
| (...skipping 309 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 772 | 773 |
| 773 ui::ThemeProvider* tp = GetThemeProvider(); | 774 ui::ThemeProvider* tp = GetThemeProvider(); |
| 774 if (tp && chevron_) { | 775 if (tp && chevron_) { |
| 775 chevron_->SetImage(views::Button::STATE_NORMAL, | 776 chevron_->SetImage(views::Button::STATE_NORMAL, |
| 776 *tp->GetImageSkiaNamed(IDR_BROWSER_ACTIONS_OVERFLOW)); | 777 *tp->GetImageSkiaNamed(IDR_BROWSER_ACTIONS_OVERFLOW)); |
| 777 } | 778 } |
| 778 | 779 |
| 779 const int kImages[] = IMAGE_GRID(IDR_DEVELOPER_MODE_HIGHLIGHT); | 780 const int kImages[] = IMAGE_GRID(IDR_DEVELOPER_MODE_HIGHLIGHT); |
| 780 highlight_painter_.reset(views::Painter::CreateImageGridPainter(kImages)); | 781 highlight_painter_.reset(views::Painter::CreateImageGridPainter(kImages)); |
| 781 } | 782 } |
| OLD | NEW |