Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(151)

Side by Side Diff: chrome/browser/ui/views/page_info_bubble_view.cc

Issue 6622002: Do all OOLing in the views code. linux_views now builds clean with the clang plugin. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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 "base/utf_string_conversions.h" 7 #include "base/utf_string_conversions.h"
8 #include "chrome/browser/browser_list.h" 8 #include "chrome/browser/browser_list.h"
9 #include "chrome/browser/google/google_util.h" 9 #include "chrome/browser/google/google_util.h"
10 #include "chrome/browser/ui/views/frame/browser_view.h" 10 #include "chrome/browser/ui/views/frame/browser_view.h"
(...skipping 189 matching lines...) Expand 10 before | Expand all | Expand 10 after
200 return size; 200 return size;
201 } 201 }
202 202
203 void PageInfoBubbleView::ModelChanged() { 203 void PageInfoBubbleView::ModelChanged() {
204 animation_start_height_ = bounds().height(); 204 animation_start_height_ = bounds().height();
205 LayoutSections(); 205 LayoutSections();
206 resize_animation_.SetSlideDuration(kPageInfoSlideDuration); 206 resize_animation_.SetSlideDuration(kPageInfoSlideDuration);
207 resize_animation_.Show(); 207 resize_animation_.Show();
208 } 208 }
209 209
210 bool PageInfoBubbleView::CloseOnEscape() {
211 return true;
212 }
213
214 bool PageInfoBubbleView::FadeInOnShow() {
215 return false;
216 }
217
218 std::wstring PageInfoBubbleView::accessible_name() {
219 return L"PageInfoBubble";
220 }
221
210 void PageInfoBubbleView::LinkActivated(views::Link* source, int event_flags) { 222 void PageInfoBubbleView::LinkActivated(views::Link* source, int event_flags) {
211 // We want to make sure the info bubble closes once the link is activated. So 223 // We want to make sure the info bubble closes once the link is activated. So
212 // we close it explicitly rather than relying on a side-effect of opening a 224 // we close it explicitly rather than relying on a side-effect of opening a
213 // new tab (see http://crosbug.com/10186). 225 // new tab (see http://crosbug.com/10186).
214 info_bubble_->Close(); 226 info_bubble_->Close();
215 227
216 GURL url = google_util::AppendGoogleLocaleParam( 228 GURL url = google_util::AppendGoogleLocaleParam(
217 GURL(chrome::kPageInfoHelpCenterURL)); 229 GURL(chrome::kPageInfoHelpCenterURL));
218 Browser* browser = BrowserList::GetLastActive(); 230 Browser* browser = BrowserList::GetLastActive();
219 browser->OpenURL(url, GURL(), NEW_FOREGROUND_TAB, PageTransition::LINK); 231 browser->OpenURL(url, GURL(), NEW_FOREGROUND_TAB, PageTransition::LINK);
(...skipping 132 matching lines...) Expand 10 before | Expand all | Expand 10 after
352 PageInfoBubbleView* page_info_bubble = 364 PageInfoBubbleView* page_info_bubble =
353 new PageInfoBubbleView(parent, profile, url, ssl, show_history); 365 new PageInfoBubbleView(parent, profile, url, ssl, show_history);
354 InfoBubble* info_bubble = 366 InfoBubble* info_bubble =
355 InfoBubble::Show(browser_view->GetWidget(), bounds, 367 InfoBubble::Show(browser_view->GetWidget(), bounds,
356 BubbleBorder::TOP_LEFT, 368 BubbleBorder::TOP_LEFT,
357 page_info_bubble, page_info_bubble); 369 page_info_bubble, page_info_bubble);
358 page_info_bubble->set_info_bubble(info_bubble); 370 page_info_bubble->set_info_bubble(info_bubble);
359 } 371 }
360 372
361 } 373 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698