| 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 #include <set> | 5 #include <set> |
| 6 #include <string> | 6 #include <string> |
| 7 | 7 |
| 8 #include "base/memory/scoped_vector.h" | 8 #include "base/memory/scoped_vector.h" |
| 9 #include "chrome/browser/content_settings/host_content_settings_map.h" | 9 #include "chrome/browser/content_settings/host_content_settings_map.h" |
| 10 #include "chrome/browser/content_settings/tab_specific_content_settings.h" | 10 #include "chrome/browser/content_settings/tab_specific_content_settings.h" |
| (...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 88 // GeolocationPermissionContextTests ------------------------------------------ | 88 // GeolocationPermissionContextTests ------------------------------------------ |
| 89 | 89 |
| 90 // This class sets up GeolocationArbitrator. | 90 // This class sets up GeolocationArbitrator. |
| 91 class GeolocationPermissionContextTests : public TabContentsWrapperTestHarness { | 91 class GeolocationPermissionContextTests : public TabContentsWrapperTestHarness { |
| 92 public: | 92 public: |
| 93 GeolocationPermissionContextTests(); | 93 GeolocationPermissionContextTests(); |
| 94 | 94 |
| 95 protected: | 95 protected: |
| 96 virtual ~GeolocationPermissionContextTests(); | 96 virtual ~GeolocationPermissionContextTests(); |
| 97 | 97 |
| 98 int process_id() { return contents()->render_view_host()->process()->id(); } | 98 int process_id() { |
| 99 return contents()->render_view_host()->process()->GetID(); |
| 100 } |
| 99 int process_id_for_tab(int tab) { | 101 int process_id_for_tab(int tab) { |
| 100 return extra_tabs_[tab]->tab_contents()->render_view_host()->process()-> | 102 return extra_tabs_[tab]->tab_contents()->render_view_host()->process()-> |
| 101 id(); | 103 GetID(); |
| 102 } | 104 } |
| 103 int render_id() { return contents()->render_view_host()->routing_id(); } | 105 int render_id() { return contents()->render_view_host()->routing_id(); } |
| 104 int render_id_for_tab(int tab) { | 106 int render_id_for_tab(int tab) { |
| 105 return extra_tabs_[tab]->tab_contents()->render_view_host()->routing_id(); | 107 return extra_tabs_[tab]->tab_contents()->render_view_host()->routing_id(); |
| 106 } | 108 } |
| 107 int bridge_id() const { return 42; } // Not relevant at this level. | 109 int bridge_id() const { return 42; } // Not relevant at this level. |
| 108 InfoBarTabHelper* infobar_tab_helper() { | 110 InfoBarTabHelper* infobar_tab_helper() { |
| 109 return contents_wrapper()->infobar_tab_helper(); | 111 return contents_wrapper()->infobar_tab_helper(); |
| 110 } | 112 } |
| 111 | 113 |
| (...skipping 419 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 531 // Ensure only one infobar is created. | 533 // Ensure only one infobar is created. |
| 532 ASSERT_EQ(1U, infobar_tab_helper()->infobar_count()); | 534 ASSERT_EQ(1U, infobar_tab_helper()->infobar_count()); |
| 533 ConfirmInfoBarDelegate* infobar_0 = infobar_tab_helper()-> | 535 ConfirmInfoBarDelegate* infobar_0 = infobar_tab_helper()-> |
| 534 GetInfoBarDelegateAt(0)->AsConfirmInfoBarDelegate(); | 536 GetInfoBarDelegateAt(0)->AsConfirmInfoBarDelegate(); |
| 535 ASSERT_TRUE(infobar_0); | 537 ASSERT_TRUE(infobar_0); |
| 536 | 538 |
| 537 // Delete the tab contents. | 539 // Delete the tab contents. |
| 538 DeleteContents(); | 540 DeleteContents(); |
| 539 infobar_0->InfoBarClosed(); | 541 infobar_0->InfoBarClosed(); |
| 540 } | 542 } |
| OLD | NEW |