| 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 "chrome/browser/ui/views/page_info_bubble_view.h" | 5 #include "chrome/browser/ui/views/page_info_bubble_view.h" |
| 6 | 6 |
| 7 #include <algorithm> | 7 #include <algorithm> |
| 8 | 8 |
| 9 #include "base/utf_string_conversions.h" | 9 #include "base/utf_string_conversions.h" |
| 10 #include "chrome/browser/certificate_viewer.h" | 10 #include "chrome/browser/certificate_viewer.h" |
| (...skipping 290 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 301 } | 301 } |
| 302 | 302 |
| 303 bool PageInfoBubbleView::CloseOnEscape() { | 303 bool PageInfoBubbleView::CloseOnEscape() { |
| 304 return true; | 304 return true; |
| 305 } | 305 } |
| 306 | 306 |
| 307 bool PageInfoBubbleView::FadeInOnShow() { | 307 bool PageInfoBubbleView::FadeInOnShow() { |
| 308 return false; | 308 return false; |
| 309 } | 309 } |
| 310 | 310 |
| 311 std::wstring PageInfoBubbleView::accessible_name() { | 311 string16 PageInfoBubbleView::GetAccessibleName() { |
| 312 return L"PageInfoBubble"; | 312 return L"PageInfoBubble"; |
| 313 } | 313 } |
| 314 | 314 |
| 315 void PageInfoBubbleView::LinkClicked(views::Link* source, int event_flags) { | 315 void PageInfoBubbleView::LinkClicked(views::Link* source, int event_flags) { |
| 316 // We want to make sure the info bubble closes once the link is activated. So | 316 // We want to make sure the info bubble closes once the link is activated. So |
| 317 // we close it explicitly rather than relying on a side-effect of opening a | 317 // we close it explicitly rather than relying on a side-effect of opening a |
| 318 // new tab (see http://crosbug.com/10186). | 318 // new tab (see http://crosbug.com/10186). |
| 319 bubble_->Close(); | 319 bubble_->Close(); |
| 320 | 320 |
| 321 GURL url = google_util::AppendGoogleLocaleParam( | 321 GURL url = google_util::AppendGoogleLocaleParam( |
| (...skipping 176 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 498 PageInfoBubbleView* page_info_bubble = | 498 PageInfoBubbleView* page_info_bubble = |
| 499 new PageInfoBubbleView(browser_view->GetNativeHandle(), | 499 new PageInfoBubbleView(browser_view->GetNativeHandle(), |
| 500 profile, url, ssl, show_history); | 500 profile, url, ssl, show_history); |
| 501 Bubble* bubble = | 501 Bubble* bubble = |
| 502 Bubble::Show(browser_view->GetWidget(), bounds, | 502 Bubble::Show(browser_view->GetWidget(), bounds, |
| 503 views::BubbleBorder::TOP_LEFT, | 503 views::BubbleBorder::TOP_LEFT, |
| 504 page_info_bubble, page_info_bubble); | 504 page_info_bubble, page_info_bubble); |
| 505 page_info_bubble->set_bubble(bubble); | 505 page_info_bubble->set_bubble(bubble); |
| 506 } | 506 } |
| 507 } | 507 } |
| OLD | NEW |