| 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/extensions/extension_popup.h" | 5 #include "chrome/browser/views/extensions/extension_popup.h" |
| 6 | 6 |
| 7 #include "chrome/browser/browser.h" | 7 #include "chrome/browser/browser.h" |
| 8 #include "chrome/browser/browser_list.h" | 8 #include "chrome/browser/browser_list.h" |
| 9 #include "chrome/browser/browser_window.h" | 9 #include "chrome/browser/browser_window.h" |
| 10 #include "chrome/browser/debugger/devtools_manager.h" | 10 #include "chrome/browser/debugger/devtools_manager.h" |
| (...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 102 // The bubble chrome requires a separate window, so construct it here. | 102 // The bubble chrome requires a separate window, so construct it here. |
| 103 if (BUBBLE_CHROME == popup_chrome_) { | 103 if (BUBBLE_CHROME == popup_chrome_) { |
| 104 gfx::NativeView native_window = frame->GetNativeView(); | 104 gfx::NativeView native_window = frame->GetNativeView(); |
| 105 #if defined(OS_LINUX) | 105 #if defined(OS_LINUX) |
| 106 border_widget_ = new views::WidgetGtk(views::WidgetGtk::TYPE_WINDOW); | 106 border_widget_ = new views::WidgetGtk(views::WidgetGtk::TYPE_WINDOW); |
| 107 static_cast<views::WidgetGtk*>(border_widget_)->MakeTransparent(); | 107 static_cast<views::WidgetGtk*>(border_widget_)->MakeTransparent(); |
| 108 static_cast<views::WidgetGtk*>(border_widget_)->make_transient_to_parent(); | 108 static_cast<views::WidgetGtk*>(border_widget_)->make_transient_to_parent(); |
| 109 #else | 109 #else |
| 110 border_widget_ = Widget::CreatePopupWidget(Widget::Transparent, | 110 border_widget_ = Widget::CreatePopupWidget(Widget::Transparent, |
| 111 Widget::NotAcceptEvents, | 111 Widget::NotAcceptEvents, |
| 112 Widget::DeleteOnDestroy); | 112 Widget::DeleteOnDestroy, |
| 113 Widget::MirrorOriginInRTL); |
| 113 #endif | 114 #endif |
| 114 border_widget_->Init(native_window, bounds()); | 115 border_widget_->Init(native_window, bounds()); |
| 115 #if defined(OS_CHROMEOS) | 116 #if defined(OS_CHROMEOS) |
| 116 chromeos::WmIpc::instance()->SetWindowType( | 117 chromeos::WmIpc::instance()->SetWindowType( |
| 117 border_widget_->GetNativeView(), | 118 border_widget_->GetNativeView(), |
| 118 chromeos::WM_IPC_WINDOW_CHROME_INFO_BUBBLE, | 119 chromeos::WM_IPC_WINDOW_CHROME_INFO_BUBBLE, |
| 119 NULL); | 120 NULL); |
| 120 #endif | 121 #endif |
| 121 border_ = new BubbleBorder(arrow_location); | 122 border_ = new BubbleBorder(arrow_location); |
| 122 border_view_ = new views::View; | 123 border_view_ = new views::View; |
| (...skipping 267 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 390 | 391 |
| 391 void ExtensionPopup::Close() { | 392 void ExtensionPopup::Close() { |
| 392 if (closing_) | 393 if (closing_) |
| 393 return; | 394 return; |
| 394 closing_ = true; | 395 closing_ = true; |
| 395 DetachFromBrowser(); | 396 DetachFromBrowser(); |
| 396 if (observer_) | 397 if (observer_) |
| 397 observer_->ExtensionPopupClosed(this); | 398 observer_->ExtensionPopupClosed(this); |
| 398 Release(); // Balanced in ctor. | 399 Release(); // Balanced in ctor. |
| 399 } | 400 } |
| OLD | NEW |