Index: chrome/browser/ui/views/location_bar/click_handler.cc |
diff --git a/chrome/browser/ui/views/location_bar/click_handler.cc b/chrome/browser/ui/views/location_bar/click_handler.cc |
index 8f636ae1ab04f1150c4f34bb7e701221144db239..be24ba4f35fac3b7fd45be809fcc1e5791df2756 100644 |
--- a/chrome/browser/ui/views/location_bar/click_handler.cc |
+++ b/chrome/browser/ui/views/location_bar/click_handler.cc |
@@ -6,12 +6,20 @@ |
#include "chrome/browser/ui/browser.h" |
#include "chrome/browser/ui/tab_contents/tab_contents_wrapper.h" |
+#include "chrome/browser/ui/views/window.h" |
sky
2012/02/28 18:24:24
sort
altimofeev
2012/02/29 18:57:29
Done.
|
+#include "chrome/browser/ui/views/page_info_bubble_view.h" |
#include "chrome/browser/ui/views/location_bar/location_bar_view.h" |
+#include "chrome/browser/ui/views/location_bar/location_icon_view.h" |
#include "content/public/browser/navigation_controller.h" |
#include "content/public/browser/navigation_entry.h" |
#include "content/public/browser/web_contents.h" |
#include "ui/views/view.h" |
+#if defined(USE_AURA) |
+#include "ash/shell.h" |
+#include "ash/shell_window_ids.h" |
+#endif |
+ |
using content::NavigationController; |
using content::NavigationEntry; |
using content::WebContents; |
@@ -39,6 +47,22 @@ void ClickHandler::OnMouseReleased(const views::MouseEvent& event) { |
return; |
} |
- Browser* browser = Browser::GetBrowserForController(&controller, NULL); |
- browser->ShowPageInfo(tab, nav_entry->GetURL(), nav_entry->GetSSL(), true); |
+ Browser* browser = location_bar_->FindBrowser(); |
+ if (browser) { |
+ browser->ShowPageInfo(tab, nav_entry->GetURL(), nav_entry->GetSSL(), true); |
+ } else { |
+#if defined(USE_AURA) |
+ PageInfoBubbleView* page_info_bubble = |
+ new PageInfoBubbleView( |
+ location_bar_->location_icon_view(), location_bar_->profile(), |
+ nav_entry->GetURL(), nav_entry->GetSSL(), true); |
+ page_info_bubble->set_parent_window( |
+ ash::Shell::GetInstance()->GetContainer( |
+ ash::internal::kShellWindowId_LockSystemModalContainer)); |
+ browser::CreateViewsBubble(page_info_bubble); |
+ page_info_bubble->Show(); |
+#else |
+ NOTIMPLEMENTED(); |
+#endif |
+ } |
} |