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 <stddef.h> | 7 #include <stddef.h> |
8 | 8 |
9 #include "base/macros.h" | 9 #include "base/macros.h" |
10 #include "chrome/browser/extensions/api/extension_action/extension_action_api.h" | 10 #include "chrome/browser/extensions/api/extension_action/extension_action_api.h" |
(...skipping 273 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
284 BrowserActionsContainer* overflow_bar() { return overflow_bar_; } | 284 BrowserActionsContainer* overflow_bar() { return overflow_bar_; } |
285 | 285 |
286 private: | 286 private: |
287 void SetUpOnMainThread() override; | 287 void SetUpOnMainThread() override; |
288 void TearDownOnMainThread() override; | 288 void TearDownOnMainThread() override; |
289 | 289 |
290 // The main BrowserActionsContainer (owned by the browser view). | 290 // The main BrowserActionsContainer (owned by the browser view). |
291 BrowserActionsContainer* main_bar_; | 291 BrowserActionsContainer* main_bar_; |
292 | 292 |
293 // A parent view for the overflow menu. | 293 // A parent view for the overflow menu. |
294 scoped_ptr<views::View> overflow_parent_; | 294 std::unique_ptr<views::View> overflow_parent_; |
295 | 295 |
296 // The overflow BrowserActionsContainer. We manufacture this so that we don't | 296 // The overflow BrowserActionsContainer. We manufacture this so that we don't |
297 // have to open the app menu. | 297 // have to open the app menu. |
298 // Owned by the |overflow_parent_|. | 298 // Owned by the |overflow_parent_|. |
299 BrowserActionsContainer* overflow_bar_; | 299 BrowserActionsContainer* overflow_bar_; |
300 | 300 |
301 DISALLOW_COPY_AND_ASSIGN(BrowserActionsContainerOverflowTest); | 301 DISALLOW_COPY_AND_ASSIGN(BrowserActionsContainerOverflowTest); |
302 }; | 302 }; |
303 | 303 |
304 void BrowserActionsContainerOverflowTest::SetUpOnMainThread() { | 304 void BrowserActionsContainerOverflowTest::SetUpOnMainThread() { |
(...skipping 164 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
469 | 469 |
470 main_bar()->OnDragUpdated(target_event3); | 470 main_bar()->OnDragUpdated(target_event3); |
471 main_bar()->OnPerformDrop(target_event3); | 471 main_bar()->OnPerformDrop(target_event3); |
472 | 472 |
473 // Order should be A C B, and there should be no extensions in overflow. | 473 // Order should be A C B, and there should be no extensions in overflow. |
474 EXPECT_EQ(extension_a()->id(), main_bar()->GetIdAt(0u)); | 474 EXPECT_EQ(extension_a()->id(), main_bar()->GetIdAt(0u)); |
475 EXPECT_EQ(extension_c()->id(), main_bar()->GetIdAt(1u)); | 475 EXPECT_EQ(extension_c()->id(), main_bar()->GetIdAt(1u)); |
476 EXPECT_EQ(extension_b()->id(), main_bar()->GetIdAt(2u)); | 476 EXPECT_EQ(extension_b()->id(), main_bar()->GetIdAt(2u)); |
477 EXPECT_TRUE(VerifyVisibleCount(3u)); | 477 EXPECT_TRUE(VerifyVisibleCount(3u)); |
478 } | 478 } |
OLD | NEW |