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/frame/browser_view.h" | 5 #include "chrome/browser/ui/views/frame/browser_view.h" |
6 | 6 |
7 #include "base/memory/scoped_ptr.h" | 7 #include "base/memory/scoped_ptr.h" |
8 | 8 |
9 #include "chrome/app/chrome_command_ids.h" | 9 #include "chrome/app/chrome_command_ids.h" |
10 #include "chrome/browser/autocomplete/autocomplete_classifier.h" | 10 #include "chrome/browser/autocomplete/autocomplete_classifier.h" |
(...skipping 30 matching lines...) Expand all Loading... |
41 gfx::Rect tabstrip_bounds( | 41 gfx::Rect tabstrip_bounds( |
42 browser_view->frame()->GetBoundsForTabStrip(browser_view->tabstrip())); | 42 browser_view->frame()->GetBoundsForTabStrip(browser_view->tabstrip())); |
43 gfx::Point tabstrip_origin(tabstrip_bounds.origin()); | 43 gfx::Point tabstrip_origin(tabstrip_bounds.origin()); |
44 views::View::ConvertPointToTarget(browser_view->parent(), | 44 views::View::ConvertPointToTarget(browser_view->parent(), |
45 browser_view, | 45 browser_view, |
46 &tabstrip_origin); | 46 &tabstrip_origin); |
47 return tabstrip_origin; | 47 return tabstrip_origin; |
48 } | 48 } |
49 | 49 |
50 // Caller owns the returned service. | 50 // Caller owns the returned service. |
51 ProfileKeyedService* CreateTemplateURLService( | 51 BrowserContextKeyedService* CreateTemplateURLService( |
52 content::BrowserContext* profile) { | 52 content::BrowserContext* profile) { |
53 return new TemplateURLService(static_cast<Profile*>(profile)); | 53 return new TemplateURLService(static_cast<Profile*>(profile)); |
54 } | 54 } |
55 | 55 |
56 ProfileKeyedService* CreateAutocompleteClassifier( | 56 BrowserContextKeyedService* CreateAutocompleteClassifier( |
57 content::BrowserContext* profile) { | 57 content::BrowserContext* profile) { |
58 return new AutocompleteClassifier(static_cast<Profile*>(profile)); | 58 return new AutocompleteClassifier(static_cast<Profile*>(profile)); |
59 } | 59 } |
60 | 60 |
61 } // namespace | 61 } // namespace |
62 | 62 |
63 class BrowserViewTest : public BrowserWithTestWindowTest { | 63 class BrowserViewTest : public BrowserWithTestWindowTest { |
64 public: | 64 public: |
65 BrowserViewTest(); | 65 BrowserViewTest(); |
66 virtual ~BrowserViewTest() {} | 66 virtual ~BrowserViewTest() {} |
(...skipping 178 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
245 string16()); | 245 string16()); |
246 EXPECT_FALSE(bookmark_bar->visible()); | 246 EXPECT_FALSE(bookmark_bar->visible()); |
247 EXPECT_FALSE(bookmark_bar->IsDetached()); | 247 EXPECT_FALSE(bookmark_bar->IsDetached()); |
248 EXPECT_EQ(top_container, bookmark_bar->parent()); | 248 EXPECT_EQ(top_container, bookmark_bar->parent()); |
249 // Top container is still second from front. | 249 // Top container is still second from front. |
250 EXPECT_EQ(browser_view()->child_count() - 2, | 250 EXPECT_EQ(browser_view()->child_count() - 2, |
251 browser_view()->GetIndexOf(top_container)); | 251 browser_view()->GetIndexOf(top_container)); |
252 | 252 |
253 BookmarkBarView::DisableAnimationsForTesting(false); | 253 BookmarkBarView::DisableAnimationsForTesting(false); |
254 } | 254 } |
OLD | NEW |