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

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

Issue 1585011: Add menu and menu item events to the accessibility extension api, and... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 10 years, 8 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) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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 47 matching lines...) Expand 10 before | Expand all | Expand 10 after
58 #include "views/grid_layout.h" 58 #include "views/grid_layout.h"
59 #include "views/widget/root_view.h" 59 #include "views/widget/root_view.h"
60 #include "views/window/dialog_delegate.h" 60 #include "views/window/dialog_delegate.h"
61 #include "views/window/window.h" 61 #include "views/window/window.h"
62 62
63 #if defined(OS_WIN) 63 #if defined(OS_WIN)
64 #include "app/win_util.h" 64 #include "app/win_util.h"
65 #include "chrome/browser/aeropeek_manager.h" 65 #include "chrome/browser/aeropeek_manager.h"
66 #include "chrome/browser/jumplist.h" 66 #include "chrome/browser/jumplist.h"
67 #elif defined(OS_LINUX) 67 #elif defined(OS_LINUX)
68 #include "chrome/browser/gtk/accessible_widget_helper_gtk.h"
68 #include "chrome/browser/views/accelerator_table_gtk.h" 69 #include "chrome/browser/views/accelerator_table_gtk.h"
69 #include "views/window/hit_test.h" 70 #include "views/window/hit_test.h"
70 #endif 71 #endif
71 72
72 using base::TimeDelta; 73 using base::TimeDelta;
73 using views::ColumnSet; 74 using views::ColumnSet;
74 using views::GridLayout; 75 using views::GridLayout;
75 76
76 // The height of the status bubble. 77 // The height of the status bubble.
77 static const int kStatusBubbleHeight = 20; 78 static const int kStatusBubbleHeight = 20;
(...skipping 554 matching lines...) Expand 10 before | Expand all | Expand 10 after
632 } 633 }
633 634
634 bool BrowserView::IsPositionInWindowCaption(const gfx::Point& point) { 635 bool BrowserView::IsPositionInWindowCaption(const gfx::Point& point) {
635 return GetBrowserViewLayout()->IsPositionInWindowCaption(point); 636 return GetBrowserViewLayout()->IsPositionInWindowCaption(point);
636 } 637 }
637 638
638 /////////////////////////////////////////////////////////////////////////////// 639 ///////////////////////////////////////////////////////////////////////////////
639 // BrowserView, BrowserWindow implementation: 640 // BrowserView, BrowserWindow implementation:
640 641
641 void BrowserView::Show() { 642 void BrowserView::Show() {
643 #if defined(OS_LINUX)
644 if (!accessible_widget_helper_.get()) {
645 accessible_widget_helper_.reset(new AccessibleWidgetHelper(
646 GTK_WIDGET(GetWindow()->GetNativeWindow()), browser_->profile()));
647 }
648 #endif
649
642 // If the window is already visible, just activate it. 650 // If the window is already visible, just activate it.
643 if (frame_->GetWindow()->IsVisible()) { 651 if (frame_->GetWindow()->IsVisible()) {
644 frame_->GetWindow()->Activate(); 652 frame_->GetWindow()->Activate();
645 return; 653 return;
646 } 654 }
647 655
648 // Setting the focus doesn't work when the window is invisible, so any focus 656 // Setting the focus doesn't work when the window is invisible, so any focus
649 // initialization that happened before this will be lost. 657 // initialization that happened before this will be lost.
650 // 658 //
651 // We really "should" restore the focus whenever the window becomes unhidden, 659 // We really "should" restore the focus whenever the window becomes unhidden,
(...skipping 1472 matching lines...) Expand 10 before | Expand all | Expand 10 after
2124 SetAccessibleName(l10n_util::GetString(IDS_PRODUCT_NAME)); 2132 SetAccessibleName(l10n_util::GetString(IDS_PRODUCT_NAME));
2125 2133
2126 return view; 2134 return view;
2127 } 2135 }
2128 #endif 2136 #endif
2129 2137
2130 // static 2138 // static
2131 FindBar* BrowserWindow::CreateFindBar(Browser* browser) { 2139 FindBar* BrowserWindow::CreateFindBar(Browser* browser) {
2132 return browser::CreateFindBar(static_cast<BrowserView*>(browser->window())); 2140 return browser::CreateFindBar(static_cast<BrowserView*>(browser->window()));
2133 } 2141 }
OLDNEW
« no previous file with comments | « chrome/browser/views/frame/browser_view.h ('k') | chrome/common/extensions/api/extension_api.json » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698