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

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

Issue 6312160: Map Views to Profiles directly from their window, eliminating the need... (Closed) Base URL: svn://chrome-svn/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
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 25 matching lines...) Expand all
36 #include "chrome/browser/tab_contents/tab_contents_view.h" 36 #include "chrome/browser/tab_contents/tab_contents_view.h"
37 #include "chrome/browser/tabs/tab_strip_model.h" 37 #include "chrome/browser/tabs/tab_strip_model.h"
38 #include "chrome/browser/themes/browser_theme_provider.h" 38 #include "chrome/browser/themes/browser_theme_provider.h"
39 #include "chrome/browser/ui/app_modal_dialogs/app_modal_dialog_queue.h" 39 #include "chrome/browser/ui/app_modal_dialogs/app_modal_dialog_queue.h"
40 #include "chrome/browser/ui/browser.h" 40 #include "chrome/browser/ui/browser.h"
41 #include "chrome/browser/ui/browser_dialogs.h" 41 #include "chrome/browser/ui/browser_dialogs.h"
42 #include "chrome/browser/ui/browser_list.h" 42 #include "chrome/browser/ui/browser_list.h"
43 #include "chrome/browser/ui/tab_contents/tab_contents_wrapper.h" 43 #include "chrome/browser/ui/tab_contents/tab_contents_wrapper.h"
44 #include "chrome/browser/ui/toolbar/wrench_menu_model.h" 44 #include "chrome/browser/ui/toolbar/wrench_menu_model.h"
45 #include "chrome/browser/ui/view_ids.h" 45 #include "chrome/browser/ui/view_ids.h"
46 #include "chrome/browser/ui/views/accessible_view_helper.h"
47 #include "chrome/browser/ui/views/bookmark_bar_view.h" 46 #include "chrome/browser/ui/views/bookmark_bar_view.h"
48 #include "chrome/browser/ui/views/browser_dialogs.h" 47 #include "chrome/browser/ui/views/browser_dialogs.h"
49 #include "chrome/browser/ui/views/default_search_view.h" 48 #include "chrome/browser/ui/views/default_search_view.h"
50 #include "chrome/browser/ui/views/download_shelf_view.h" 49 #include "chrome/browser/ui/views/download_shelf_view.h"
51 #include "chrome/browser/ui/views/frame/browser_view_layout.h" 50 #include "chrome/browser/ui/views/frame/browser_view_layout.h"
52 #include "chrome/browser/ui/views/frame/contents_container.h" 51 #include "chrome/browser/ui/views/frame/contents_container.h"
53 #include "chrome/browser/ui/views/fullscreen_exit_bubble.h" 52 #include "chrome/browser/ui/views/fullscreen_exit_bubble.h"
54 #include "chrome/browser/ui/views/location_bar/location_icon_view.h" 53 #include "chrome/browser/ui/views/location_bar/location_icon_view.h"
55 #include "chrome/browser/ui/views/status_bubble_views.h" 54 #include "chrome/browser/ui/views/status_bubble_views.h"
56 #include "chrome/browser/ui/views/tab_contents/tab_contents_container.h" 55 #include "chrome/browser/ui/views/tab_contents/tab_contents_container.h"
(...skipping 1804 matching lines...) Expand 10 before | Expand all | Expand 10 after
1861 tabstrip_->SetAccessibleName(l10n_util::GetStringUTF16(IDS_ACCNAME_TABSTRIP)); 1860 tabstrip_->SetAccessibleName(l10n_util::GetStringUTF16(IDS_ACCNAME_TABSTRIP));
1862 AddChildView(tabstrip_); 1861 AddChildView(tabstrip_);
1863 1862
1864 tabstrip_controller->InitFromModel(tabstrip_); 1863 tabstrip_controller->InitFromModel(tabstrip_);
1865 } 1864 }
1866 1865
1867 /////////////////////////////////////////////////////////////////////////////// 1866 ///////////////////////////////////////////////////////////////////////////////
1868 // BrowserView, private: 1867 // BrowserView, private:
1869 1868
1870 void BrowserView::Init() { 1869 void BrowserView::Init() {
1871 accessible_view_helper_.reset(new AccessibleViewHelper(
1872 this, browser_->profile()));
1873
1874 SetLayoutManager(CreateLayoutManager()); 1870 SetLayoutManager(CreateLayoutManager());
1875 // Stow a pointer to this object onto the window handle so that we can get at 1871 // Stow a pointer to this object onto the window handle so that we can get at
1876 // it later when all we have is a native view. 1872 // it later when all we have is a native view.
1877 GetWidget()->SetNativeWindowProperty(kBrowserViewKey, this); 1873 GetWidget()->SetNativeWindowProperty(kBrowserViewKey, this);
1878 1874
1879 // Stow a pointer to the browser's profile onto the window handle so that we 1875 // Stow a pointer to the browser's profile onto the window handle so that we
1880 // can get it later when all we have is a native view. 1876 // can get it later when all we have is a native view.
1881 GetWindow()->SetNativeWindowProperty(Profile::kProfileKey, 1877 GetWindow()->SetNativeWindowProperty(Profile::kProfileKey,
1882 browser_->profile()); 1878 browser_->profile());
1883 1879
(...skipping 692 matching lines...) Expand 10 before | Expand all | Expand 10 after
2576 l10n_util::GetStringUTF16(IDS_PRODUCT_NAME)); 2572 l10n_util::GetStringUTF16(IDS_PRODUCT_NAME));
2577 2573
2578 return view; 2574 return view;
2579 } 2575 }
2580 #endif 2576 #endif
2581 2577
2582 // static 2578 // static
2583 FindBar* BrowserWindow::CreateFindBar(Browser* browser) { 2579 FindBar* BrowserWindow::CreateFindBar(Browser* browser) {
2584 return browser::CreateFindBar(static_cast<BrowserView*>(browser->window())); 2580 return browser::CreateFindBar(static_cast<BrowserView*>(browser->window()));
2585 } 2581 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698