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

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

Issue 6286159: Removing duplicated calls in BrowserView::ProcessTabSelected (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: " Created 9 years, 10 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 | « no previous file | no next file » | 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(OS_LINUX) 7 #if defined(OS_LINUX)
8 #include <gtk/gtk.h> 8 #include <gtk/gtk.h>
9 #endif 9 #endif
10 10
(...skipping 2523 matching lines...) Expand 10 before | Expand all | Expand 10 after
2534 new_contents->tab_contents()->DidBecomeSelected(); 2534 new_contents->tab_contents()->DidBecomeSelected();
2535 if (BrowserList::GetLastActive() == browser_ && 2535 if (BrowserList::GetLastActive() == browser_ &&
2536 !browser_->tabstrip_model()->closing_all() && GetWindow()->IsVisible()) { 2536 !browser_->tabstrip_model()->closing_all() && GetWindow()->IsVisible()) {
2537 // We only restore focus if our window is visible, to avoid invoking blur 2537 // We only restore focus if our window is visible, to avoid invoking blur
2538 // handlers when we are eventually shown. 2538 // handlers when we are eventually shown.
2539 new_contents->view()->RestoreFocus(); 2539 new_contents->view()->RestoreFocus();
2540 } 2540 }
2541 2541
2542 // Update all the UI bits. 2542 // Update all the UI bits.
2543 UpdateTitleBar(); 2543 UpdateTitleBar();
2544 UpdateToolbar(new_contents, true); 2544 // No need to update Toolbar because it's already updated in
2545 UpdateUIForContents(new_contents); 2545 // browser.cc.
2546 } 2546 }
2547 2547
2548 gfx::Size BrowserView::GetResizeCornerSize() const { 2548 gfx::Size BrowserView::GetResizeCornerSize() const {
2549 return ResizeCorner::GetSize(); 2549 return ResizeCorner::GetSize();
2550 } 2550 }
2551 2551
2552 #if !defined(OS_CHROMEOS) 2552 #if !defined(OS_CHROMEOS)
2553 // static 2553 // static
2554 BrowserWindow* BrowserWindow::CreateBrowserWindow(Browser* browser) { 2554 BrowserWindow* BrowserWindow::CreateBrowserWindow(Browser* browser) {
2555 // Create the view and the frame. The frame will attach itself via the view 2555 // Create the view and the frame. The frame will attach itself via the view
2556 // so we don't need to do anything with the pointer. 2556 // so we don't need to do anything with the pointer.
2557 BrowserView* view = new BrowserView(browser); 2557 BrowserView* view = new BrowserView(browser);
2558 BrowserFrame::Create(view, browser->profile()); 2558 BrowserFrame::Create(view, browser->profile());
2559 2559
2560 view->GetWindow()->GetNonClientView()->SetAccessibleName( 2560 view->GetWindow()->GetNonClientView()->SetAccessibleName(
2561 l10n_util::GetStringUTF16(IDS_PRODUCT_NAME)); 2561 l10n_util::GetStringUTF16(IDS_PRODUCT_NAME));
2562 2562
2563 return view; 2563 return view;
2564 } 2564 }
2565 #endif 2565 #endif
2566 2566
2567 // static 2567 // static
2568 FindBar* BrowserWindow::CreateFindBar(Browser* browser) { 2568 FindBar* BrowserWindow::CreateFindBar(Browser* browser) {
2569 return browser::CreateFindBar(static_cast<BrowserView*>(browser->window())); 2569 return browser::CreateFindBar(static_cast<BrowserView*>(browser->window()));
2570 } 2570 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698