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

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

Issue 6976040: Revert 86914 - Move a bunch of functions from Window onto Widget. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 9 years, 7 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/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 1670 matching lines...) Expand 10 before | Expand all | Expand 10 after
1681 1681
1682 // Give beforeunload handlers the chance to cancel the close before we hide 1682 // Give beforeunload handlers the chance to cancel the close before we hide
1683 // the window below. 1683 // the window below.
1684 if (!browser_->ShouldCloseWindow()) 1684 if (!browser_->ShouldCloseWindow())
1685 return false; 1685 return false;
1686 1686
1687 if (!browser_->tabstrip_model()->empty()) { 1687 if (!browser_->tabstrip_model()->empty()) {
1688 // Tab strip isn't empty. Hide the frame (so it appears to have closed 1688 // Tab strip isn't empty. Hide the frame (so it appears to have closed
1689 // immediately) and close all the tabs, allowing the renderers to shut 1689 // immediately) and close all the tabs, allowing the renderers to shut
1690 // down. When the tab strip is empty we'll be called back again. 1690 // down. When the tab strip is empty we'll be called back again.
1691 frame_->Hide(); 1691 frame_->HideWindow();
1692 browser_->OnWindowClosing(); 1692 browser_->OnWindowClosing();
1693 return false; 1693 return false;
1694 } 1694 }
1695 1695
1696 // Empty TabStripModel, it's now safe to allow the Window to be closed. 1696 // Empty TabStripModel, it's now safe to allow the Window to be closed.
1697 NotificationService::current()->Notify( 1697 NotificationService::current()->Notify(
1698 NotificationType::WINDOW_CLOSED, 1698 NotificationType::WINDOW_CLOSED,
1699 Source<gfx::NativeWindow>(frame_->GetNativeWindow()), 1699 Source<gfx::NativeWindow>(frame_->GetNativeWindow()),
1700 NotificationService::NoDetails()); 1700 NotificationService::NoDetails());
1701 return true; 1701 return true;
(...skipping 899 matching lines...) Expand 10 before | Expand all | Expand 10 after
2601 view->GetWindow()->non_client_view()->SetAccessibleName( 2601 view->GetWindow()->non_client_view()->SetAccessibleName(
2602 l10n_util::GetStringUTF16(IDS_PRODUCT_NAME)); 2602 l10n_util::GetStringUTF16(IDS_PRODUCT_NAME));
2603 return view; 2603 return view;
2604 } 2604 }
2605 #endif 2605 #endif
2606 2606
2607 // static 2607 // static
2608 FindBar* BrowserWindow::CreateFindBar(Browser* browser) { 2608 FindBar* BrowserWindow::CreateFindBar(Browser* browser) {
2609 return browser::CreateFindBar(static_cast<BrowserView*>(browser->window())); 2609 return browser::CreateFindBar(static_cast<BrowserView*>(browser->window()));
2610 } 2610 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/views/first_run_search_engine_view.cc ('k') | chrome/browser/ui/views/task_manager_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698