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

Side by Side Diff: third_party/WebKit/Source/web/ExternalPopupMenu.cpp

Issue 2848513002: Introduce the abstract class WebViewBase, to decouple WebViewImpl. (Closed)
Patch Set: Add comments to WebViewBase. Created 3 years, 7 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 /* 1 /*
2 * Copyright (C) 2010 Google Inc. All rights reserved. 2 * Copyright (C) 2010 Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 25 matching lines...) Expand all
36 #include "core/frame/LocalFrame.h" 36 #include "core/frame/LocalFrame.h"
37 #include "core/html/HTMLOptionElement.h" 37 #include "core/html/HTMLOptionElement.h"
38 #include "core/html/HTMLSelectElement.h" 38 #include "core/html/HTMLSelectElement.h"
39 #include "core/layout/LayoutBox.h" 39 #include "core/layout/LayoutBox.h"
40 #include "core/page/Page.h" 40 #include "core/page/Page.h"
41 #include "core/style/ComputedStyle.h" 41 #include "core/style/ComputedStyle.h"
42 #include "platform/geometry/FloatQuad.h" 42 #include "platform/geometry/FloatQuad.h"
43 #include "platform/geometry/IntPoint.h" 43 #include "platform/geometry/IntPoint.h"
44 #include "platform/text/TextDirection.h" 44 #include "platform/text/TextDirection.h"
45 #include "platform/wtf/PtrUtil.h" 45 #include "platform/wtf/PtrUtil.h"
46 #include "public/platform/WebCoalescedInputEvent.h"
46 #include "public/platform/WebMouseEvent.h" 47 #include "public/platform/WebMouseEvent.h"
47 #include "public/platform/WebVector.h" 48 #include "public/platform/WebVector.h"
48 #include "public/web/WebExternalPopupMenu.h" 49 #include "public/web/WebExternalPopupMenu.h"
49 #include "public/web/WebFrameClient.h" 50 #include "public/web/WebFrameClient.h"
50 #include "public/web/WebMenuItemInfo.h" 51 #include "public/web/WebMenuItemInfo.h"
51 #include "public/web/WebPopupMenuInfo.h" 52 #include "public/web/WebPopupMenuInfo.h"
53 #include "public/web/WebView.h"
52 #include "web/WebLocalFrameImpl.h" 54 #include "web/WebLocalFrameImpl.h"
53 #include "web/WebViewImpl.h"
54 55
55 namespace blink { 56 namespace blink {
56 57
57 ExternalPopupMenu::ExternalPopupMenu(LocalFrame& frame, 58 ExternalPopupMenu::ExternalPopupMenu(LocalFrame& frame,
58 HTMLSelectElement& owner_element, 59 HTMLSelectElement& owner_element,
59 WebViewImpl& web_view) 60 WebView& web_view)
60 : owner_element_(owner_element), 61 : owner_element_(owner_element),
61 local_frame_(frame), 62 local_frame_(frame),
62 web_view_(web_view), 63 web_view_(web_view),
63 dispatch_event_timer_( 64 dispatch_event_timer_(
64 TaskRunnerHelper::Get(TaskType::kUnspecedTimer, &frame), 65 TaskRunnerHelper::Get(TaskType::kUnspecedTimer, &frame),
65 this, 66 this,
66 &ExternalPopupMenu::DispatchEvent), 67 &ExternalPopupMenu::DispatchEvent),
67 web_external_popup_menu_(0) {} 68 web_external_popup_menu_(0) {}
68 69
69 ExternalPopupMenu::~ExternalPopupMenu() {} 70 ExternalPopupMenu::~ExternalPopupMenu() {}
(...skipping 234 matching lines...) Expand 10 before | Expand all | Expand 10 after
304 if (owner_element.ItemIsDisplayNone(*items[i])) 305 if (owner_element.ItemIsDisplayNone(*items[i]))
305 continue; 306 continue;
306 if (popup_menu_item_index == i) 307 if (popup_menu_item_index == i)
307 return index_tracker; 308 return index_tracker;
308 ++index_tracker; 309 ++index_tracker;
309 } 310 }
310 return -1; 311 return -1;
311 } 312 }
312 313
313 } // namespace blink 314 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698