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 303 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
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( |
322 GURL(chrome::kPageInfoHelpCenterURL)); | 322 GURL(chrome::kPageInfoHelpCenterURL)); |
323 Browser* browser = BrowserList::GetLastActive(); | 323 Browser* browser = BrowserList::GetLastActive(); |
324 browser->OpenURL(url, GURL(), NEW_FOREGROUND_TAB, PageTransition::LINK); | 324 browser->OpenURL( |
| 325 url, GURL(), NEW_FOREGROUND_TAB, content::PAGE_TRANSITION_LINK); |
325 } | 326 } |
326 | 327 |
327 void PageInfoBubbleView::AnimationEnded(const ui::Animation* animation) { | 328 void PageInfoBubbleView::AnimationEnded(const ui::Animation* animation) { |
328 LayoutSections(); | 329 LayoutSections(); |
329 bubble_->SizeToContents(); | 330 bubble_->SizeToContents(); |
330 } | 331 } |
331 | 332 |
332 void PageInfoBubbleView::AnimationProgressed(const ui::Animation* animation) { | 333 void PageInfoBubbleView::AnimationProgressed(const ui::Animation* animation) { |
333 LayoutSections(); | 334 LayoutSections(); |
334 bubble_->SizeToContents(); | 335 bubble_->SizeToContents(); |
(...skipping 163 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
498 PageInfoBubbleView* page_info_bubble = | 499 PageInfoBubbleView* page_info_bubble = |
499 new PageInfoBubbleView(browser_view->GetNativeHandle(), | 500 new PageInfoBubbleView(browser_view->GetNativeHandle(), |
500 profile, url, ssl, show_history); | 501 profile, url, ssl, show_history); |
501 Bubble* bubble = | 502 Bubble* bubble = |
502 Bubble::Show(browser_view->GetWidget(), bounds, | 503 Bubble::Show(browser_view->GetWidget(), bounds, |
503 views::BubbleBorder::TOP_LEFT, | 504 views::BubbleBorder::TOP_LEFT, |
504 page_info_bubble, page_info_bubble); | 505 page_info_bubble, page_info_bubble); |
505 page_info_bubble->set_bubble(bubble); | 506 page_info_bubble->set_bubble(bubble); |
506 } | 507 } |
507 } | 508 } |
OLD | NEW |