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

Side by Side Diff: chrome/browser/ui/views/frame/browser_view.cc

Issue 9003014: Replace WebUI::tab_contents() with web_contents() and switch all users to use web_contents.h inst... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 8 years, 11 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
« no previous file with comments | « chrome/browser/ui/views/frame/browser_view.h ('k') | chrome/browser/ui/webui/about_ui.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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/frame/browser_view.h" 5 #include "chrome/browser/ui/views/frame/browser_view.h"
6 6
7 #if defined(TOOLKIT_USES_GTK) 7 #if defined(TOOLKIT_USES_GTK)
8 #include <gtk/gtk.h> 8 #include <gtk/gtk.h>
9 #endif 9 #endif
10 10
(...skipping 2648 matching lines...) Expand 10 before | Expand all | Expand 10 after
2659 // Create the view and the frame. The frame will attach itself via the view 2659 // Create the view and the frame. The frame will attach itself via the view
2660 // so we don't need to do anything with the pointer. 2660 // so we don't need to do anything with the pointer.
2661 BrowserView* view = new BrowserView(browser); 2661 BrowserView* view = new BrowserView(browser);
2662 (new BrowserFrame(view))->InitBrowserFrame(); 2662 (new BrowserFrame(view))->InitBrowserFrame();
2663 view->GetWidget()->non_client_view()->SetAccessibleName( 2663 view->GetWidget()->non_client_view()->SetAccessibleName(
2664 l10n_util::GetStringUTF16(IDS_PRODUCT_NAME)); 2664 l10n_util::GetStringUTF16(IDS_PRODUCT_NAME));
2665 return view; 2665 return view;
2666 } 2666 }
2667 #endif 2667 #endif
2668 2668
2669 void BrowserView::ShowAvatarBubble(TabContents* tab_contents, 2669 void BrowserView::ShowAvatarBubble(WebContents* web_contents,
2670 const gfx::Rect& rect) { 2670 const gfx::Rect& rect) {
2671 gfx::Point origin(rect.origin()); 2671 gfx::Point origin(rect.origin());
2672 views::View::ConvertPointToScreen(GetTabContentsContainerView(), &origin); 2672 views::View::ConvertPointToScreen(GetTabContentsContainerView(), &origin);
2673 gfx::Rect bounds(origin, rect.size()); 2673 gfx::Rect bounds(origin, rect.size());
2674 2674
2675 AvatarMenuBubbleView* bubble = new AvatarMenuBubbleView(this, 2675 AvatarMenuBubbleView* bubble = new AvatarMenuBubbleView(this,
2676 views::BubbleBorder::TOP_RIGHT, bounds, browser_.get()); 2676 views::BubbleBorder::TOP_RIGHT, bounds, browser_.get());
2677 browser::CreateViewsBubble(bubble); 2677 browser::CreateViewsBubble(bubble);
2678 bubble->SetAlignment(views::BubbleBorder::ALIGN_EDGE_TO_ANCHOR_EDGE); 2678 bubble->SetAlignment(views::BubbleBorder::ALIGN_EDGE_TO_ANCHOR_EDGE);
2679 bubble->Show(); 2679 bubble->Show();
2680 } 2680 }
2681 2681
2682 void BrowserView::ShowAvatarBubbleFromAvatarButton() { 2682 void BrowserView::ShowAvatarBubbleFromAvatarButton() {
2683 AvatarMenuButton* button = frame_->GetAvatarMenuButton(); 2683 AvatarMenuButton* button = frame_->GetAvatarMenuButton();
2684 if (button) 2684 if (button)
2685 button->ShowAvatarBubble(); 2685 button->ShowAvatarBubble();
2686 } 2686 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/views/frame/browser_view.h ('k') | chrome/browser/ui/webui/about_ui.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698