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

Side by Side Diff: chrome/browser/ui/views/tab_contents/tab_contents_container_native.cc

Issue 7942004: Consolidate/cleanup event cracking code; single out GdkEvents. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Merge removal of compact nav. Created 9 years, 2 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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/ui/views/tab_contents/tab_contents_container.h" 5 #include "chrome/browser/ui/views/tab_contents/tab_contents_container.h"
6 6
7 #if defined(HAVE_XINPUT2) 7 #if defined(HAVE_XINPUT2)
8 #include <X11/extensions/XInput2.h> 8 #include <X11/extensions/XInput2.h>
9 #endif 9 #endif
10 10
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after
76 #if defined(HAVE_XINPUT2) 76 #if defined(HAVE_XINPUT2)
77 bool TabContentsContainer::OnMousePressed(const views::MouseEvent& event) { 77 bool TabContentsContainer::OnMousePressed(const views::MouseEvent& event) {
78 DCHECK(tab_contents_); 78 DCHECK(tab_contents_);
79 if (event.flags() & (ui::EF_LEFT_BUTTON_DOWN | 79 if (event.flags() & (ui::EF_LEFT_BUTTON_DOWN |
80 ui::EF_RIGHT_BUTTON_DOWN | 80 ui::EF_RIGHT_BUTTON_DOWN |
81 ui::EF_MIDDLE_BUTTON_DOWN)) { 81 ui::EF_MIDDLE_BUTTON_DOWN)) {
82 return false; 82 return false;
83 } 83 }
84 // It is necessary to look at the native event to determine what special 84 // It is necessary to look at the native event to determine what special
85 // button was pressed. 85 // button was pressed.
86 views::NativeEvent2 native_event = event.native_event_2(); 86 views::NativeEvent native_event = event.native_event();
87 if (!native_event) 87 if (!native_event)
88 return false; 88 return false;
89 89
90 int button = 0; 90 int button = 0;
91 switch (native_event->type) { 91 switch (native_event->type) {
92 case ButtonPress: { 92 case ButtonPress: {
93 button = native_event->xbutton.button; 93 button = native_event->xbutton.button;
94 break; 94 break;
95 } 95 }
96 case GenericEvent: { 96 case GenericEvent: {
(...skipping 29 matching lines...) Expand all
126 126
127 //////////////////////////////////////////////////////////////////////////////// 127 ////////////////////////////////////////////////////////////////////////////////
128 // TabContentsContainer, private: 128 // TabContentsContainer, private:
129 129
130 void TabContentsContainer::RenderViewHostChanged(RenderViewHost* old_host, 130 void TabContentsContainer::RenderViewHostChanged(RenderViewHost* old_host,
131 RenderViewHost* new_host) { 131 RenderViewHost* new_host) {
132 if (new_host) 132 if (new_host)
133 RenderWidgetHostViewChanged(new_host->view()); 133 RenderWidgetHostViewChanged(new_host->view());
134 native_container_->RenderViewHostChanged(old_host, new_host); 134 native_container_->RenderViewHostChanged(old_host, new_host);
135 } 135 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/views/omnibox/omnibox_view_win.cc ('k') | chrome/common/native_web_keyboard_event_views.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698