OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 "content/browser/renderer_host/render_widget_host_view_gtk.h" | 5 #include "content/browser/renderer_host/render_widget_host_view_gtk.h" |
6 | 6 |
7 // If this gets included after the gtk headers, then a bunch of compiler | 7 // If this gets included after the gtk headers, then a bunch of compiler |
8 // errors happen because of a "#define Status int" in Xlib.h, which interacts | 8 // errors happen because of a "#define Status int" in Xlib.h, which interacts |
9 // badly with net::URLRequestStatus::Status. | 9 // badly with net::URLRequestStatus::Status. |
10 #include "content/common/view_messages.h" | 10 #include "content/common/view_messages.h" |
(...skipping 691 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
702 int height = std::min(size.height(), kMaxWindowHeight); | 702 int height = std::min(size.height(), kMaxWindowHeight); |
703 if (IsPopup()) { | 703 if (IsPopup()) { |
704 // We're a popup, honor the size request. | 704 // We're a popup, honor the size request. |
705 gtk_widget_set_size_request(view_.get(), width, height); | 705 gtk_widget_set_size_request(view_.get(), width, height); |
706 } | 706 } |
707 | 707 |
708 // Update the size of the RWH. | 708 // Update the size of the RWH. |
709 if (requested_size_.width() != width || | 709 if (requested_size_.width() != width || |
710 requested_size_.height() != height) { | 710 requested_size_.height() != height) { |
711 requested_size_ = gfx::Size(width, height); | 711 requested_size_ = gfx::Size(width, height); |
| 712 host_->SendScreenRects(); |
712 host_->WasResized(); | 713 host_->WasResized(); |
713 } | 714 } |
714 } | 715 } |
715 | 716 |
716 void RenderWidgetHostViewGtk::SetBounds(const gfx::Rect& rect) { | 717 void RenderWidgetHostViewGtk::SetBounds(const gfx::Rect& rect) { |
717 // This is called when webkit has sent us a Move message. | 718 // This is called when webkit has sent us a Move message. |
718 if (IsPopup()) { | 719 if (IsPopup()) { |
719 gtk_window_move(GTK_WINDOW(gtk_widget_get_toplevel(view_.get())), | 720 gtk_window_move(GTK_WINDOW(gtk_widget_get_toplevel(view_.get())), |
720 rect.x(), rect.y()); | 721 rect.x(), rect.y()); |
721 } | 722 } |
(...skipping 807 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1529 this)); | 1530 this)); |
1530 } | 1531 } |
1531 BrowserAccessibilityGtk* root = | 1532 BrowserAccessibilityGtk* root = |
1532 browser_accessibility_manager_->GetRoot()->ToBrowserAccessibilityGtk(); | 1533 browser_accessibility_manager_->GetRoot()->ToBrowserAccessibilityGtk(); |
1533 | 1534 |
1534 atk_object_set_role(root->GetAtkObject(), ATK_ROLE_HTML_CONTAINER); | 1535 atk_object_set_role(root->GetAtkObject(), ATK_ROLE_HTML_CONTAINER); |
1535 return root->GetAtkObject(); | 1536 return root->GetAtkObject(); |
1536 } | 1537 } |
1537 | 1538 |
1538 } // namespace content | 1539 } // namespace content |
OLD | NEW |