| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 #import "chrome/browser/ui/cocoa/status_bubble_mac.h" |
| 6 |
| 5 #include <Cocoa/Cocoa.h> | 7 #include <Cocoa/Cocoa.h> |
| 6 | 8 |
| 9 #include <memory> |
| 10 |
| 7 #include "base/mac/scoped_nsobject.h" | 11 #include "base/mac/scoped_nsobject.h" |
| 8 #include "base/memory/scoped_ptr.h" | |
| 9 #include "base/message_loop/message_loop.h" | 12 #include "base/message_loop/message_loop.h" |
| 10 #include "base/strings/utf_string_conversions.h" | 13 #include "base/strings/utf_string_conversions.h" |
| 11 #import "chrome/browser/ui/cocoa/bubble_view.h" | 14 #import "chrome/browser/ui/cocoa/bubble_view.h" |
| 12 #import "chrome/browser/ui/cocoa/cocoa_test_helper.h" | 15 #import "chrome/browser/ui/cocoa/cocoa_test_helper.h" |
| 13 #import "chrome/browser/ui/cocoa/status_bubble_mac.h" | |
| 14 #include "testing/gtest/include/gtest/gtest.h" | 16 #include "testing/gtest/include/gtest/gtest.h" |
| 15 #import "testing/gtest_mac.h" | 17 #import "testing/gtest_mac.h" |
| 16 #include "testing/platform_test.h" | 18 #include "testing/platform_test.h" |
| 17 #import "third_party/ocmock/OCMock/OCMock.h" | 19 #import "third_party/ocmock/OCMock/OCMock.h" |
| 18 #include "ui/gfx/geometry/point.h" | 20 #include "ui/gfx/geometry/point.h" |
| 19 #include "url/gurl.h" | 21 #include "url/gurl.h" |
| 20 | 22 |
| 21 using base::UTF8ToUTF16; | 23 using base::UTF8ToUTF16; |
| 22 | 24 |
| 23 // The test delegate records all of the status bubble object's state | 25 // The test delegate records all of the status bubble object's state |
| (...skipping 649 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 673 backing:NSBackingStoreBuffered | 675 backing:NSBackingStoreBuffered |
| 674 defer:NO]); | 676 defer:NO]); |
| 675 | 677 |
| 676 // Switch parents with the bubble hidden. | 678 // Switch parents with the bubble hidden. |
| 677 bubble_->SwitchParentWindow(fullscreenParent); | 679 bubble_->SwitchParentWindow(fullscreenParent); |
| 678 | 680 |
| 679 // Switch back to the original parent with the bubble showing. | 681 // Switch back to the original parent with the bubble showing. |
| 680 bubble_->SetStatus(UTF8ToUTF16("Showing")); | 682 bubble_->SetStatus(UTF8ToUTF16("Showing")); |
| 681 bubble_->SwitchParentWindow(test_window()); | 683 bubble_->SwitchParentWindow(test_window()); |
| 682 } | 684 } |
| OLD | NEW |