OLD | NEW |
1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 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/chrome_views_delegate.h" | 5 #include "chrome/browser/views/chrome_views_delegate.h" |
6 | 6 |
7 #include "app/clipboard/clipboard.h" | 7 #include "app/clipboard/clipboard.h" |
8 #include "base/scoped_ptr.h" | 8 #include "base/scoped_ptr.h" |
9 #include "chrome/browser/browser_process.h" | 9 #include "chrome/browser/browser_process.h" |
10 #include "chrome/browser/pref_service.h" | 10 #include "chrome/browser/pref_service.h" |
| 11 #include "chrome/browser/views/accessibility_event_router_views.h" |
11 #include "chrome/browser/window_sizer.h" | 12 #include "chrome/browser/window_sizer.h" |
12 #include "gfx/rect.h" | 13 #include "gfx/rect.h" |
13 | 14 |
14 #if defined(OS_WIN) | 15 #if defined(OS_WIN) |
15 #include "chrome/browser/app_icon_win.h" | 16 #include "chrome/browser/app_icon_win.h" |
16 #endif | 17 #endif |
17 | 18 |
18 /////////////////////////////////////////////////////////////////////////////// | 19 /////////////////////////////////////////////////////////////////////////////// |
19 // ChromeViewsDelegate, views::ViewsDelegate implementation: | 20 // ChromeViewsDelegate, views::ViewsDelegate implementation: |
20 | 21 |
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
70 bool* maximized) const { | 71 bool* maximized) const { |
71 if (!g_browser_process->local_state()) | 72 if (!g_browser_process->local_state()) |
72 return false; | 73 return false; |
73 | 74 |
74 const DictionaryValue* dictionary = | 75 const DictionaryValue* dictionary = |
75 g_browser_process->local_state()->GetDictionary(window_name.c_str()); | 76 g_browser_process->local_state()->GetDictionary(window_name.c_str()); |
76 return dictionary && dictionary->GetBoolean(L"maximized", maximized) && | 77 return dictionary && dictionary->GetBoolean(L"maximized", maximized) && |
77 maximized; | 78 maximized; |
78 } | 79 } |
79 | 80 |
| 81 void ChromeViewsDelegate::NotifyAccessibilityEvent( |
| 82 views::View* view, AccessibilityTypes::Event event_type) { |
| 83 AccessibilityEventRouterViews::GetInstance()->HandleAccessibilityEvent( |
| 84 view, event_type); |
| 85 } |
| 86 |
80 #if defined(OS_WIN) | 87 #if defined(OS_WIN) |
81 HICON ChromeViewsDelegate::GetDefaultWindowIcon() const { | 88 HICON ChromeViewsDelegate::GetDefaultWindowIcon() const { |
82 return GetAppIcon(); | 89 return GetAppIcon(); |
83 } | 90 } |
84 #endif | 91 #endif |
85 | 92 |
86 void ChromeViewsDelegate::AddRef() { | 93 void ChromeViewsDelegate::AddRef() { |
87 g_browser_process->AddRefModule(); | 94 g_browser_process->AddRefModule(); |
88 } | 95 } |
89 | 96 |
90 void ChromeViewsDelegate::ReleaseRef() { | 97 void ChromeViewsDelegate::ReleaseRef() { |
91 g_browser_process->ReleaseModule(); | 98 g_browser_process->ReleaseModule(); |
92 } | 99 } |
OLD | NEW |