| OLD | NEW |
| 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 "base/run_loop.h" | 5 #include "base/run_loop.h" |
| 6 #include "base/strings/string16.h" | 6 #include "base/strings/string16.h" |
| 7 #include "base/strings/utf_string_conversions.h" | 7 #include "base/strings/utf_string_conversions.h" |
| 8 #include "chrome/browser/sessions/session_tab_helper.h" | 8 #include "chrome/browser/sessions/session_tab_helper.h" |
| 9 #include "chrome/browser/ui/toolbar/test_toolbar_action_view_controller.h" | 9 #include "chrome/browser/ui/toolbar/test_toolbar_action_view_controller.h" |
| 10 #include "chrome/browser/ui/toolbar/toolbar_action_view_controller.h" | 10 #include "chrome/browser/ui/toolbar/toolbar_action_view_controller.h" |
| (...skipping 17 matching lines...) Expand all Loading... |
| 28 | 28 |
| 29 // ToolbarActionView::Delegate: | 29 // ToolbarActionView::Delegate: |
| 30 content::WebContents* GetCurrentWebContents() override { | 30 content::WebContents* GetCurrentWebContents() override { |
| 31 return web_contents_; | 31 return web_contents_; |
| 32 } | 32 } |
| 33 bool ShownInsideMenu() const override { return shown_in_menu_; } | 33 bool ShownInsideMenu() const override { return shown_in_menu_; } |
| 34 void OnToolbarActionViewDragDone() override {} | 34 void OnToolbarActionViewDragDone() override {} |
| 35 views::MenuButton* GetOverflowReferenceView() override { | 35 views::MenuButton* GetOverflowReferenceView() override { |
| 36 return overflow_reference_view_; | 36 return overflow_reference_view_; |
| 37 } | 37 } |
| 38 void OnMouseEnteredToolbarActionView() override {} |
| 38 void WriteDragDataForView(views::View* sender, | 39 void WriteDragDataForView(views::View* sender, |
| 39 const gfx::Point& press_pt, | 40 const gfx::Point& press_pt, |
| 40 ui::OSExchangeData* data) override {} | 41 ui::OSExchangeData* data) override {} |
| 41 int GetDragOperationsForView(views::View* sender, | 42 int GetDragOperationsForView(views::View* sender, |
| 42 const gfx::Point& p) override { | 43 const gfx::Point& p) override { |
| 43 return ui::DragDropTypes::DRAG_NONE; | 44 return ui::DragDropTypes::DRAG_NONE; |
| 44 } | 45 } |
| 45 bool CanStartDragForView(views::View* sender, | 46 bool CanStartDragForView(views::View* sender, |
| 46 const gfx::Point& press_pt, | 47 const gfx::Point& press_pt, |
| 47 const gfx::Point& p) override { return false; } | 48 const gfx::Point& p) override { return false; } |
| (...skipping 175 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 223 // If the view isn't visible, the overflow button should be pressed for | 224 // If the view isn't visible, the overflow button should be pressed for |
| 224 // popups. | 225 // popups. |
| 225 view.SetVisible(false); | 226 view.SetVisible(false); |
| 226 controller.ShowPopup(true); | 227 controller.ShowPopup(true); |
| 227 EXPECT_EQ(views::Button::STATE_NORMAL, view.state()); | 228 EXPECT_EQ(views::Button::STATE_NORMAL, view.state()); |
| 228 EXPECT_EQ(views::Button::STATE_PRESSED, overflow_button.state()); | 229 EXPECT_EQ(views::Button::STATE_PRESSED, overflow_button.state()); |
| 229 controller.HidePopup(); | 230 controller.HidePopup(); |
| 230 EXPECT_EQ(views::Button::STATE_NORMAL, view.state()); | 231 EXPECT_EQ(views::Button::STATE_NORMAL, view.state()); |
| 231 EXPECT_EQ(views::Button::STATE_NORMAL, overflow_button.state()); | 232 EXPECT_EQ(views::Button::STATE_NORMAL, overflow_button.state()); |
| 232 } | 233 } |
| OLD | NEW |