| OLD | NEW |
| 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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/chromeos/views/native_menu_domui.h" | 5 #include "chrome/browser/chromeos/views/native_menu_domui.h" |
| 6 | 6 |
| 7 #include <string> | 7 #include <string> |
| 8 | 8 |
| 9 #include "app/menus/menu_model.h" | 9 #include "app/menus/menu_model.h" |
| 10 #include "base/message_loop.h" | 10 #include "base/message_loop.h" |
| (...skipping 231 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 242 break; | 242 break; |
| 243 } | 243 } |
| 244 default: | 244 default: |
| 245 break; | 245 break; |
| 246 } | 246 } |
| 247 gtk_main_do_event(event); | 247 gtk_main_do_event(event); |
| 248 return true; | 248 return true; |
| 249 } | 249 } |
| 250 | 250 |
| 251 #if defined(TOUCH_UI) | 251 #if defined(TOUCH_UI) |
| 252 bool NativeMenuDOMUI::Dispatch(XEvent* xevent) { | 252 base::MessagePumpGlibXDispatcher::DispatchStatus NativeMenuDOMUI::Dispatch( |
| 253 return views::DispatchXEvent(xevent); | 253 XEvent* xevent) { |
| 254 return views::DispatchXEvent(xevent) ? |
| 255 base::MessagePumpGlibXDispatcher::EVENT_PROCESSED : |
| 256 base::MessagePumpGlibXDispatcher::EVENT_IGNORED; |
| 257 |
| 254 } | 258 } |
| 255 #endif | 259 #endif |
| 256 | 260 |
| 257 //////////////////////////////////////////////////////////////////////////////// | 261 //////////////////////////////////////////////////////////////////////////////// |
| 258 // NativeMenuDOMUI, MenuControl implementation: | 262 // NativeMenuDOMUI, MenuControl implementation: |
| 259 | 263 |
| 260 void NativeMenuDOMUI::Activate(menus::MenuModel* model, | 264 void NativeMenuDOMUI::Activate(menus::MenuModel* model, |
| 261 int index, | 265 int index, |
| 262 ActivationMode activation) { | 266 ActivationMode activation) { |
| 263 NativeMenuDOMUI* root = GetRoot(); | 267 NativeMenuDOMUI* root = GetRoot(); |
| (...skipping 140 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 404 MenuWrapper* MenuWrapper::CreateWrapper(Menu2* menu) { | 408 MenuWrapper* MenuWrapper::CreateWrapper(Menu2* menu) { |
| 405 menus::MenuModel* model = menu->model(); | 409 menus::MenuModel* model = menu->model(); |
| 406 if (chromeos::MenuUI::IsEnabled()) { | 410 if (chromeos::MenuUI::IsEnabled()) { |
| 407 return new chromeos::NativeMenuDOMUI(model, true); | 411 return new chromeos::NativeMenuDOMUI(model, true); |
| 408 } else { | 412 } else { |
| 409 return new NativeMenuGtk(menu); | 413 return new NativeMenuGtk(menu); |
| 410 } | 414 } |
| 411 } | 415 } |
| 412 | 416 |
| 413 } // namespace views | 417 } // namespace views |
| OLD | NEW |