OLD | NEW |
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/info_bubble.h" | 5 #include "chrome/browser/views/info_bubble.h" |
6 | 6 |
7 #include "base/keyboard_codes.h" | 7 #include "base/keyboard_codes.h" |
8 #include "chrome/browser/window_sizer.h" | 8 #include "chrome/browser/window_sizer.h" |
9 #include "chrome/common/notification_service.h" | 9 #include "chrome/common/notification_service.h" |
10 #include "gfx/canvas.h" | 10 #include "gfx/canvas.h" |
(...skipping 317 matching lines...) Loading... |
328 if (fade_in) { | 328 if (fade_in) { |
329 border_->SetOpacity(0); | 329 border_->SetOpacity(0); |
330 SetOpacity(0); | 330 SetOpacity(0); |
331 } | 331 } |
332 | 332 |
333 border_->Init(CreateBorderContents(), parent->GetNativeView()); | 333 border_->Init(CreateBorderContents(), parent->GetNativeView()); |
334 | 334 |
335 // We make the BorderWidget the owner of the InfoBubble HWND, so that the | 335 // We make the BorderWidget the owner of the InfoBubble HWND, so that the |
336 // latter is displayed on top of the former. | 336 // latter is displayed on top of the former. |
337 WidgetWin::Init(border_->GetNativeView(), gfx::Rect()); | 337 WidgetWin::Init(border_->GetNativeView(), gfx::Rect()); |
| 338 |
| 339 SetWindowText(GetNativeView(), delegate_->accessible_name().c_str()); |
338 #elif defined(OS_LINUX) | 340 #elif defined(OS_LINUX) |
339 MakeTransparent(); | 341 MakeTransparent(); |
340 make_transient_to_parent(); | 342 make_transient_to_parent(); |
341 WidgetGtk::Init( | 343 WidgetGtk::Init( |
342 GTK_WIDGET(static_cast<WidgetGtk*>(parent)->GetNativeView()), | 344 GTK_WIDGET(static_cast<WidgetGtk*>(parent)->GetNativeView()), |
343 gfx::Rect()); | 345 gfx::Rect()); |
344 #if defined(OS_CHROMEOS) | 346 #if defined(OS_CHROMEOS) |
345 chromeos::WmIpc::instance()->SetWindowType( | 347 chromeos::WmIpc::instance()->SetWindowType( |
346 GetNativeView(), | 348 GetNativeView(), |
347 chromeos::WM_IPC_WINDOW_CHROME_INFO_BUBBLE, | 349 chromeos::WM_IPC_WINDOW_CHROME_INFO_BUBBLE, |
(...skipping 155 matching lines...) Loading... |
503 animation_->Hide(); | 505 animation_->Hide(); |
504 } | 506 } |
505 | 507 |
506 bool InfoBubble::AcceleratorPressed(const views::Accelerator& accelerator) { | 508 bool InfoBubble::AcceleratorPressed(const views::Accelerator& accelerator) { |
507 if (!delegate_ || delegate_->CloseOnEscape()) { | 509 if (!delegate_ || delegate_->CloseOnEscape()) { |
508 Close(true); | 510 Close(true); |
509 return true; | 511 return true; |
510 } | 512 } |
511 return false; | 513 return false; |
512 } | 514 } |
OLD | NEW |