Chromium Code Reviews| Index: chrome/browser/automation/automation_util.cc |
| =================================================================== |
| --- chrome/browser/automation/automation_util.cc (revision 138369) |
| +++ chrome/browser/automation/automation_util.cc (working copy) |
| @@ -31,7 +31,6 @@ |
| #include "content/public/browser/browser_thread.h" |
| #include "content/public/browser/render_process_host.h" |
| #include "content/public/browser/render_view_host.h" |
| -#include "content/public/browser/render_view_host_delegate.h" |
| #include "content/public/browser/web_contents.h" |
| #include "net/cookies/cookie_monster.h" |
| #include "net/cookies/cookie_store.h" |
| @@ -416,7 +415,9 @@ |
| AutomationId GetIdForExtensionView( |
| const content::RenderViewHost* render_view_host) { |
| AutomationId::Type type; |
| - switch (render_view_host->GetDelegate()->GetRenderViewType()) { |
| + WebContents* web_contents = WebContents::FromRenderViewHost( |
| + const_cast<RenderViewHost*>(render_view_host)); |
|
Avi (use Gerrit)
2012/05/23 03:22:52
Eeeewww. Can you please fix FromRenderViewHost to
jam
2012/05/23 04:18:38
Done.
|
| + switch (chrome::GetViewType(web_contents)) { |
| case chrome::VIEW_TYPE_EXTENSION_POPUP: |
| type = AutomationId::kTypeExtensionPopup; |
| break; |