| Index: views/widget/widget.cc
|
| ===================================================================
|
| --- views/widget/widget.cc (revision 76963)
|
| +++ views/widget/widget.cc (working copy)
|
| @@ -25,6 +25,8 @@
|
| Widget::~Widget() {
|
| }
|
|
|
| +// Unconverted methods (see header) --------------------------------------------
|
| +
|
| void Widget::Init(gfx::NativeView parent, const gfx::Rect& bounds) {
|
| GetRootView();
|
| default_theme_provider_.reset(new DefaultThemeProvider);
|
| @@ -33,6 +35,42 @@
|
| void Widget::InitWithWidget(Widget* parent, const gfx::Rect& bounds) {
|
| }
|
|
|
| +gfx::NativeView Widget::GetNativeView() const {
|
| + return NULL;
|
| +}
|
| +
|
| +void Widget::GenerateMousePressedForView(View* view, const gfx::Point& point) {
|
| +}
|
| +
|
| +bool Widget::GetAccelerator(int cmd_id, ui::Accelerator* accelerator) {
|
| + return false;
|
| +}
|
| +
|
| +Window* Widget::GetWindow() {
|
| + return NULL;
|
| +}
|
| +
|
| +const Window* Widget::GetWindow() const {
|
| + return NULL;
|
| +}
|
| +
|
| +void Widget::ViewHierarchyChanged(bool is_add, View* parent, View* child) {
|
| + if (!is_add) {
|
| + if (child == dragged_view_)
|
| + dragged_view_ = NULL;
|
| +
|
| + FocusManager* focus_manager = GetFocusManager();
|
| + if (focus_manager) {
|
| + if (focus_manager->GetFocusedView() == child)
|
| + focus_manager->SetFocusedView(NULL);
|
| + focus_manager->ViewRemoved(parent, child);
|
| + }
|
| + ViewStorage::GetInstance()->ViewRemoved(parent, child);
|
| + }
|
| +}
|
| +
|
| +// Converted methods (see header) ----------------------------------------------
|
| +
|
| Widget* Widget::GetTopLevelWidget() {
|
| return const_cast<Widget*>(
|
| const_cast<const Widget*>(this)->GetTopLevelWidget());
|
| @@ -57,34 +95,39 @@
|
| }
|
|
|
| void Widget::SetBounds(const gfx::Rect& bounds) {
|
| + native_widget_->SetBounds(bounds);
|
| }
|
|
|
| void Widget::MoveAbove(Widget* widget) {
|
| + native_widget_->MoveAbove(widget);
|
| }
|
|
|
| void Widget::SetShape(gfx::NativeRegion shape) {
|
| + native_widget_->SetShape(shape);
|
| }
|
|
|
| void Widget::Close() {
|
| + native_widget_->Close();
|
| }
|
|
|
| void Widget::CloseNow() {
|
| + native_widget_->CloseNow();
|
| }
|
|
|
| void Widget::Show() {
|
| + native_widget_->Show();
|
| }
|
|
|
| void Widget::Hide() {
|
| + native_widget_->Hide();
|
| }
|
|
|
| -gfx::NativeView Widget::GetNativeView() const {
|
| - return NULL;
|
| -}
|
| -
|
| void Widget::SetOpacity(unsigned char opacity) {
|
| + native_widget_->SetOpacity(opacity);
|
| }
|
|
|
| void Widget::SetAlwaysOnTop(bool on_top) {
|
| + native_widget_->SetAlwaysOnTop(on_top);
|
| }
|
|
|
| RootView* Widget::GetRootView() {
|
| @@ -96,32 +139,17 @@
|
| }
|
|
|
| bool Widget::IsVisible() const {
|
| - return false;
|
| + return native_widget_->IsVisible();
|
| }
|
|
|
| bool Widget::IsActive() const {
|
| - return false;
|
| + return native_widget_->IsActive();
|
| }
|
|
|
| bool Widget::IsAccessibleWidget() const {
|
| - return false;
|
| + return native_widget_->IsAccessibleWidget();
|
| }
|
|
|
| -void Widget::GenerateMousePressedForView(View* view, const gfx::Point& point) {
|
| -}
|
| -
|
| -bool Widget::GetAccelerator(int cmd_id, ui::Accelerator* accelerator) {
|
| - return false;
|
| -}
|
| -
|
| -Window* Widget::GetWindow() {
|
| - return NULL;
|
| -}
|
| -
|
| -const Window* Widget::GetWindow() const {
|
| - return NULL;
|
| -}
|
| -
|
| ThemeProvider* Widget::GetThemeProvider() const {
|
| const Widget* root_widget = GetTopLevelWidget();
|
| if (root_widget && root_widget != this) {
|
| @@ -146,21 +174,6 @@
|
| return focus_manager_.get();
|
| }
|
|
|
| -void Widget::ViewHierarchyChanged(bool is_add, View* parent, View* child) {
|
| - if (!is_add) {
|
| - if (child == dragged_view_)
|
| - dragged_view_ = NULL;
|
| -
|
| - FocusManager* focus_manager = GetFocusManager();
|
| - if (focus_manager) {
|
| - if (focus_manager->GetFocusedView() == child)
|
| - focus_manager->SetFocusedView(NULL);
|
| - focus_manager->ViewRemoved(parent, child);
|
| - }
|
| - ViewStorage::GetInstance()->ViewRemoved(parent, child);
|
| - }
|
| -}
|
| -
|
| bool Widget::ContainsNativeView(gfx::NativeView native_view) {
|
| if (native_widget_->ContainsNativeView(native_view))
|
| return true;
|
|
|