Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(85)

Side by Side Diff: content/browser/renderer_host/render_widget_host_view_gtk.cc

Issue 10537037: Fix gcc 4.7 building problems - cont' (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Modified per Aaron's comment Created 8 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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
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 char*>(moz_spinning_bits), 32, 32);
Peter Kasting 2012/06/07 18:09:52 Nit: Use const gchar* (2 places)
Han Shen 2012/06/07 19:09:11 Done.
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 char*>(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 1398 matching lines...) Expand 10 before | Expand all | Expand 10 after
1497 browser_accessibility_manager_.reset( 1497 browser_accessibility_manager_.reset(
1498 BrowserAccessibilityManager::CreateEmptyDocument( 1498 BrowserAccessibilityManager::CreateEmptyDocument(
1499 parent, static_cast<WebAccessibility::State>(0), this)); 1499 parent, static_cast<WebAccessibility::State>(0), this));
1500 } 1500 }
1501 BrowserAccessibilityGtk* root = 1501 BrowserAccessibilityGtk* root =
1502 browser_accessibility_manager_->GetRoot()->ToBrowserAccessibilityGtk(); 1502 browser_accessibility_manager_->GetRoot()->ToBrowserAccessibilityGtk();
1503 1503
1504 atk_object_set_role(root->GetAtkObject(), ATK_ROLE_HTML_CONTAINER); 1504 atk_object_set_role(root->GetAtkObject(), ATK_ROLE_HTML_CONTAINER);
1505 return root->GetAtkObject(); 1505 return root->GetAtkObject();
1506 } 1506 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698