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 64 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
75 #else | 75 #else |
76 { 0, 0x00 * 257, 0xff * 257, 0x00 * 257 }; | 76 { 0, 0x00 * 257, 0xff * 257, 0x00 * 257 }; |
77 #endif | 77 #endif |
78 | 78 |
79 // Returns the spinning cursor used for loading state. | 79 // Returns the spinning cursor used for loading state. |
80 GdkCursor* GetMozSpinningCursor() { | 80 GdkCursor* GetMozSpinningCursor() { |
81 static GdkCursor* moz_spinning_cursor = NULL; | 81 static GdkCursor* moz_spinning_cursor = NULL; |
82 if (!moz_spinning_cursor) { | 82 if (!moz_spinning_cursor) { |
83 const GdkColor fg = { 0, 0, 0, 0 }; | 83 const GdkColor fg = { 0, 0, 0, 0 }; |
84 const GdkColor bg = { 65535, 65535, 65535, 65535 }; | 84 const GdkColor bg = { 65535, 65535, 65535, 65535 }; |
85 GdkPixmap* source = | 85 GdkPixmap* source = gdk_bitmap_create_from_data( |
86 gdk_bitmap_create_from_data(NULL, moz_spinning_bits, 32, 32); | 86 NULL, reinterpret_cast<const gchar*>(moz_spinning_bits), 32, 32); |
87 GdkPixmap* mask = | 87 GdkPixmap* mask = gdk_bitmap_create_from_data( |
88 gdk_bitmap_create_from_data(NULL, moz_spinning_mask_bits, 32, 32); | 88 NULL, reinterpret_cast<const gchar*>(moz_spinning_mask_bits), 32, 32); |
89 moz_spinning_cursor = | 89 moz_spinning_cursor = |
90 gdk_cursor_new_from_pixmap(source, mask, &fg, &bg, 2, 2); | 90 gdk_cursor_new_from_pixmap(source, mask, &fg, &bg, 2, 2); |
91 g_object_unref(source); | 91 g_object_unref(source); |
92 g_object_unref(mask); | 92 g_object_unref(mask); |
93 } | 93 } |
94 return moz_spinning_cursor; | 94 return moz_spinning_cursor; |
95 } | 95 } |
96 | 96 |
97 bool MovedToCenter(const WebKit::WebMouseEvent& mouse_event, | 97 bool MovedToCenter(const WebKit::WebMouseEvent& mouse_event, |
98 const gfx::Point& center) { | 98 const gfx::Point& center) { |
(...skipping 1408 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1507 browser_accessibility_manager_.reset( | 1507 browser_accessibility_manager_.reset( |
1508 BrowserAccessibilityManager::CreateEmptyDocument( | 1508 BrowserAccessibilityManager::CreateEmptyDocument( |
1509 parent, static_cast<WebAccessibility::State>(0), this)); | 1509 parent, static_cast<WebAccessibility::State>(0), this)); |
1510 } | 1510 } |
1511 BrowserAccessibilityGtk* root = | 1511 BrowserAccessibilityGtk* root = |
1512 browser_accessibility_manager_->GetRoot()->ToBrowserAccessibilityGtk(); | 1512 browser_accessibility_manager_->GetRoot()->ToBrowserAccessibilityGtk(); |
1513 | 1513 |
1514 atk_object_set_role(root->GetAtkObject(), ATK_ROLE_HTML_CONTAINER); | 1514 atk_object_set_role(root->GetAtkObject(), ATK_ROLE_HTML_CONTAINER); |
1515 return root->GetAtkObject(); | 1515 return root->GetAtkObject(); |
1516 } | 1516 } |
OLD | NEW |