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

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

Issue 155446: Adds MSAA information to various (previously uncovered) bits of the UI, inclu... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 years, 5 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) 2006-2009 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2006-2009 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/views/frame/browser_view.h" 5 #include "chrome/browser/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 1412 matching lines...) Expand 10 before | Expand all | Expand 10 after
1423 // hang detection is not disabled). 1423 // hang detection is not disabled).
1424 if (!CommandLine::ForCurrentProcess()->HasSwitch( 1424 if (!CommandLine::ForCurrentProcess()->HasSwitch(
1425 switches::kDisableHangMonitor)) { 1425 switches::kDisableHangMonitor)) {
1426 InitHangMonitor(); 1426 InitHangMonitor();
1427 } 1427 }
1428 1428
1429 LoadAccelerators(); 1429 LoadAccelerators();
1430 SetAccessibleName(l10n_util::GetString(IDS_PRODUCT_NAME)); 1430 SetAccessibleName(l10n_util::GetString(IDS_PRODUCT_NAME));
1431 1431
1432 tabstrip_ = TabStripWrapper::CreateTabStrip(browser_->tabstrip_model()); 1432 tabstrip_ = TabStripWrapper::CreateTabStrip(browser_->tabstrip_model());
1433 tabstrip_->GetView()->SetAccessibleName(l10n_util::GetString(IDS_ACCNAME_TABST RIP)); 1433 tabstrip_->
1434 GetView()->SetAccessibleName(l10n_util::GetString(IDS_ACCNAME_TABSTRIP));
1434 AddChildView(tabstrip_->GetView()); 1435 AddChildView(tabstrip_->GetView());
1435 frame_->TabStripCreated(tabstrip_); 1436 frame_->TabStripCreated(tabstrip_);
1436 1437
1437 toolbar_ = new ToolbarView(browser_.get()); 1438 toolbar_ = new ToolbarView(browser_.get());
1438 AddChildView(toolbar_); 1439 AddChildView(toolbar_);
1439 toolbar_->SetID(VIEW_ID_TOOLBAR); 1440 toolbar_->SetID(VIEW_ID_TOOLBAR);
1440 toolbar_->Init(browser_->profile()); 1441 toolbar_->Init(browser_->profile());
1441 toolbar_->SetAccessibleName(l10n_util::GetString(IDS_ACCNAME_TOOLBAR)); 1442 toolbar_->SetAccessibleName(l10n_util::GetString(IDS_ACCNAME_TOOLBAR));
1442 1443
1443 infobar_container_ = new InfoBarContainer(this); 1444 infobar_container_ = new InfoBarContainer(this);
1444 AddChildView(infobar_container_); 1445 AddChildView(infobar_container_);
1445 1446
1446 contents_container_ = new TabContentsContainer; 1447 contents_container_ = new TabContentsContainer;
1447 devtools_container_ = new TabContentsContainer; 1448 devtools_container_ = new TabContentsContainer;
1448 devtools_container_->SetVisible(false); 1449 devtools_container_->SetVisible(false);
1449 contents_split_ = new views::SingleSplitView( 1450 contents_split_ = new views::SingleSplitView(
1450 contents_container_, 1451 contents_container_,
1451 devtools_container_, 1452 devtools_container_,
1452 views::SingleSplitView::VERTICAL_SPLIT); 1453 views::SingleSplitView::VERTICAL_SPLIT);
1453 SkColor bg_color = GetWidget()->GetThemeProvider()-> 1454 SkColor bg_color = GetWidget()->GetThemeProvider()->
1454 GetColor(BrowserThemeProvider::COLOR_TOOLBAR); 1455 GetColor(BrowserThemeProvider::COLOR_TOOLBAR);
1455 contents_split_->set_background( 1456 contents_split_->set_background(
1456 views::Background::CreateSolidBackground(bg_color)); 1457 views::Background::CreateSolidBackground(bg_color));
1457 AddChildView(contents_split_); 1458 AddChildView(contents_split_);
1458 set_contents_view(contents_split_); 1459 set_contents_view(contents_split_);
1459 1460
1460 status_bubble_.reset(new StatusBubbleViews(GetWidget())); 1461 status_bubble_.reset(new StatusBubbleViews(GetWidget()));
1461 1462
1462 extension_shelf_ = new ExtensionShelf(browser_.get()); 1463 extension_shelf_ = new ExtensionShelf(browser_.get());
1464 extension_shelf_->
1465 SetAccessibleName(l10n_util::GetString(IDS_ACCNAME_EXTENSIONS));
1463 AddChildView(extension_shelf_); 1466 AddChildView(extension_shelf_);
1464 1467
1465 #if defined(OS_WIN) 1468 #if defined(OS_WIN)
1466 InitSystemMenu(); 1469 InitSystemMenu();
1467 #endif 1470 #endif
1468 } 1471 }
1469 1472
1470 #if defined(OS_WIN) 1473 #if defined(OS_WIN)
1471 void BrowserView::InitSystemMenu() { 1474 void BrowserView::InitSystemMenu() {
1472 system_menu_contents_.reset(new views::SystemMenuModel(this)); 1475 system_menu_contents_.reset(new views::SystemMenuModel(this));
(...skipping 130 matching lines...) Expand 10 before | Expand all | Expand 10 after
1603 if (browser_->SupportsWindowFeature(Browser::FEATURE_BOOKMARKBAR) 1606 if (browser_->SupportsWindowFeature(Browser::FEATURE_BOOKMARKBAR)
1604 && contents) { 1607 && contents) {
1605 if (!bookmark_bar_view_.get()) { 1608 if (!bookmark_bar_view_.get()) {
1606 bookmark_bar_view_.reset(new BookmarkBarView(contents->profile(), 1609 bookmark_bar_view_.reset(new BookmarkBarView(contents->profile(),
1607 browser_.get())); 1610 browser_.get()));
1608 bookmark_bar_view_->SetParentOwned(false); 1611 bookmark_bar_view_->SetParentOwned(false);
1609 } else { 1612 } else {
1610 bookmark_bar_view_->SetProfile(contents->profile()); 1613 bookmark_bar_view_->SetProfile(contents->profile());
1611 } 1614 }
1612 bookmark_bar_view_->SetPageNavigator(contents); 1615 bookmark_bar_view_->SetPageNavigator(contents);
1616 bookmark_bar_view_->
1617 SetAccessibleName(l10n_util::GetString(IDS_ACCNAME_BOOKMARKS));
1613 new_bookmark_bar_view = bookmark_bar_view_.get(); 1618 new_bookmark_bar_view = bookmark_bar_view_.get();
1614 } 1619 }
1615 return UpdateChildViewAndLayout(new_bookmark_bar_view, &active_bookmark_bar_); 1620 return UpdateChildViewAndLayout(new_bookmark_bar_view, &active_bookmark_bar_);
1616 } 1621 }
1617 1622
1618 bool BrowserView::MaybeShowInfoBar(TabContents* contents) { 1623 bool BrowserView::MaybeShowInfoBar(TabContents* contents) {
1619 // TODO(beng): Remove this function once the interface between 1624 // TODO(beng): Remove this function once the interface between
1620 // InfoBarContainer, DownloadShelfView and TabContents and this 1625 // InfoBarContainer, DownloadShelfView and TabContents and this
1621 // view is sorted out. 1626 // view is sorted out.
1622 return true; 1627 return true;
(...skipping 268 matching lines...) Expand 10 before | Expand all | Expand 10 after
1891 1896
1892 // static 1897 // static
1893 FindBar* BrowserWindow::CreateFindBar(Browser* browser) { 1898 FindBar* BrowserWindow::CreateFindBar(Browser* browser) {
1894 return browser::CreateFindBar(static_cast<BrowserView*>(browser->window())); 1899 return browser::CreateFindBar(static_cast<BrowserView*>(browser->window()));
1895 } 1900 }
1896 1901
1897 // static 1902 // static
1898 void BrowserList::AllBrowsersClosed() { 1903 void BrowserList::AllBrowsersClosed() {
1899 views::Window::CloseAllSecondaryWindows(); 1904 views::Window::CloseAllSecondaryWindows();
1900 } 1905 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698