| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 #include <utility> | 7 #include <utility> |
| 8 | 8 |
| 9 #include "base/bind.h" | 9 #include "base/bind.h" |
| 10 #include "base/hash_tables.h" | 10 #include "base/hash_tables.h" |
| 11 #include "base/memory/scoped_vector.h" | 11 #include "base/memory/scoped_vector.h" |
| (...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 95 | 95 |
| 96 protected: | 96 protected: |
| 97 virtual ~GeolocationPermissionContextTests(); | 97 virtual ~GeolocationPermissionContextTests(); |
| 98 | 98 |
| 99 int process_id() { | 99 int process_id() { |
| 100 return contents()->GetRenderProcessHost()->GetID(); | 100 return contents()->GetRenderProcessHost()->GetID(); |
| 101 } | 101 } |
| 102 int process_id_for_tab(int tab) { | 102 int process_id_for_tab(int tab) { |
| 103 return extra_tabs_[tab]->web_contents()->GetRenderProcessHost()->GetID(); | 103 return extra_tabs_[tab]->web_contents()->GetRenderProcessHost()->GetID(); |
| 104 } | 104 } |
| 105 int render_id() { return contents()->GetRenderViewHost()->routing_id(); } | 105 int render_id() { return contents()->GetRenderViewHost()->GetRoutingID(); } |
| 106 int render_id_for_tab(int tab) { | 106 int render_id_for_tab(int tab) { |
| 107 return extra_tabs_[tab]->web_contents()->GetRenderViewHost()->routing_id(); | 107 return extra_tabs_[tab]->web_contents()-> |
| 108 GetRenderViewHost()->GetRoutingID(); |
| 108 } | 109 } |
| 109 int bridge_id() const { return 42; } // Not relevant at this level. | 110 int bridge_id() const { return 42; } // Not relevant at this level. |
| 110 InfoBarTabHelper* infobar_tab_helper() { | 111 InfoBarTabHelper* infobar_tab_helper() { |
| 111 return contents_wrapper()->infobar_tab_helper(); | 112 return contents_wrapper()->infobar_tab_helper(); |
| 112 } | 113 } |
| 113 | 114 |
| 114 void RequestGeolocationPermission(int render_process_id, | 115 void RequestGeolocationPermission(int render_process_id, |
| 115 int render_view_id, | 116 int render_view_id, |
| 116 int bridge_id, | 117 int bridge_id, |
| 117 const GURL& requesting_frame); | 118 const GURL& requesting_frame); |
| (...skipping 469 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 587 ASSERT_FALSE(infobar_0->ShouldExpire(details)); | 588 ASSERT_FALSE(infobar_0->ShouldExpire(details)); |
| 588 // Commit the "GoBack()" above, and ensure the infobar is now expired. | 589 // Commit the "GoBack()" above, and ensure the infobar is now expired. |
| 589 contents()->CommitPendingNavigation(); | 590 contents()->CommitPendingNavigation(); |
| 590 details.entry = contents()->GetController().GetLastCommittedEntry(); | 591 details.entry = contents()->GetController().GetLastCommittedEntry(); |
| 591 ASSERT_TRUE(infobar_0->ShouldExpire(details)); | 592 ASSERT_TRUE(infobar_0->ShouldExpire(details)); |
| 592 | 593 |
| 593 // Delete the tab contents. | 594 // Delete the tab contents. |
| 594 DeleteContents(); | 595 DeleteContents(); |
| 595 infobar_0->InfoBarClosed(); | 596 infobar_0->InfoBarClosed(); |
| 596 } | 597 } |
| OLD | NEW |