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

Side by Side Diff: chrome/renderer/render_view.h

Issue 4078003: Refactoring select popup on Mac.... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 10 years, 1 month 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
« no previous file with comments | « chrome/renderer/external_popup_menu_unittest.cc ('k') | chrome/renderer/render_view.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 #ifndef CHROME_RENDERER_RENDER_VIEW_H_ 5 #ifndef CHROME_RENDERER_RENDER_VIEW_H_
6 #define CHROME_RENDERER_RENDER_VIEW_H_ 6 #define CHROME_RENDERER_RENDER_VIEW_H_
7 #pragma once 7 #pragma once
8 8
9 #include <deque> 9 #include <deque>
10 #include <map> 10 #include <map>
(...skipping 10 matching lines...) Expand all
21 #include "base/weak_ptr.h" 21 #include "base/weak_ptr.h"
22 #include "build/build_config.h" 22 #include "build/build_config.h"
23 #include "chrome/common/content_settings.h" 23 #include "chrome/common/content_settings.h"
24 #include "chrome/common/edit_command.h" 24 #include "chrome/common/edit_command.h"
25 #include "chrome/common/navigation_gesture.h" 25 #include "chrome/common/navigation_gesture.h"
26 #include "chrome/common/page_zoom.h" 26 #include "chrome/common/page_zoom.h"
27 #include "chrome/common/render_messages.h" 27 #include "chrome/common/render_messages.h"
28 #include "chrome/common/render_messages_params.h" 28 #include "chrome/common/render_messages_params.h"
29 #include "chrome/common/renderer_preferences.h" 29 #include "chrome/common/renderer_preferences.h"
30 #include "chrome/common/view_types.h" 30 #include "chrome/common/view_types.h"
31 #include "chrome/renderer/external_popup_menu.h"
31 #include "chrome/renderer/pepper_plugin_delegate_impl.h" 32 #include "chrome/renderer/pepper_plugin_delegate_impl.h"
32 #include "chrome/renderer/render_widget.h" 33 #include "chrome/renderer/render_widget.h"
33 #include "chrome/renderer/renderer_webcookiejar_impl.h" 34 #include "chrome/renderer/renderer_webcookiejar_impl.h"
34 #include "chrome/renderer/translate_helper.h" 35 #include "chrome/renderer/translate_helper.h"
35 #include "third_party/WebKit/WebKit/chromium/public/WebConsoleMessage.h" 36 #include "third_party/WebKit/WebKit/chromium/public/WebConsoleMessage.h"
36 #include "third_party/WebKit/WebKit/chromium/public/WebFileSystem.h" 37 #include "third_party/WebKit/WebKit/chromium/public/WebFileSystem.h"
37 #include "third_party/WebKit/WebKit/chromium/public/WebFrameClient.h" 38 #include "third_party/WebKit/WebKit/chromium/public/WebFrameClient.h"
38 #include "third_party/WebKit/WebKit/chromium/public/WebMediaPlayerAction.h" 39 #include "third_party/WebKit/WebKit/chromium/public/WebMediaPlayerAction.h"
39 #include "third_party/WebKit/WebKit/chromium/public/WebPageSerializerClient.h" 40 #include "third_party/WebKit/WebKit/chromium/public/WebPageSerializerClient.h"
40 #include "third_party/WebKit/WebKit/chromium/public/WebTextDirection.h" 41 #include "third_party/WebKit/WebKit/chromium/public/WebTextDirection.h"
(...skipping 303 matching lines...) Expand 10 before | Expand all | Expand 10 after
344 345
345 // WebKit::WebViewClient implementation -------------------------------------- 346 // WebKit::WebViewClient implementation --------------------------------------
346 347
347 virtual WebKit::WebView* createView( 348 virtual WebKit::WebView* createView(
348 WebKit::WebFrame* creator, 349 WebKit::WebFrame* creator,
349 const WebKit::WebWindowFeatures& features, 350 const WebKit::WebWindowFeatures& features,
350 const WebKit::WebString& frame_name); 351 const WebKit::WebString& frame_name);
351 virtual WebKit::WebWidget* createPopupMenu(WebKit::WebPopupType popup_type); 352 virtual WebKit::WebWidget* createPopupMenu(WebKit::WebPopupType popup_type);
352 virtual WebKit::WebWidget* createPopupMenu( 353 virtual WebKit::WebWidget* createPopupMenu(
353 const WebKit::WebPopupMenuInfo& info); 354 const WebKit::WebPopupMenuInfo& info);
355 virtual WebKit::WebExternalPopupMenu* createExternalPopupMenu(
356 const WebKit::WebPopupMenuInfo& popup_menu_info,
357 WebKit::WebExternalPopupMenuClient* popup_menu_client);
354 virtual WebKit::WebWidget* createFullscreenWindow( 358 virtual WebKit::WebWidget* createFullscreenWindow(
355 WebKit::WebPopupType popup_type); 359 WebKit::WebPopupType popup_type);
356 virtual WebKit::WebStorageNamespace* createSessionStorageNamespace( 360 virtual WebKit::WebStorageNamespace* createSessionStorageNamespace(
357 unsigned quota); 361 unsigned quota);
358 virtual void didAddMessageToConsole( 362 virtual void didAddMessageToConsole(
359 const WebKit::WebConsoleMessage& message, 363 const WebKit::WebConsoleMessage& message,
360 const WebKit::WebString& source_name, 364 const WebKit::WebString& source_name,
361 unsigned source_line); 365 unsigned source_line);
362 virtual void printPage(WebKit::WebFrame* frame); 366 virtual void printPage(WebKit::WebFrame* frame);
363 virtual WebKit::WebNotificationPresenter* notificationPresenter(); 367 virtual WebKit::WebNotificationPresenter* notificationPresenter();
(...skipping 259 matching lines...) Expand 10 before | Expand all | Expand 10 after
623 virtual void DidHandleKeyEvent(); 627 virtual void DidHandleKeyEvent();
624 virtual void DidHandleMouseEvent(const WebKit::WebMouseEvent& event); 628 virtual void DidHandleMouseEvent(const WebKit::WebMouseEvent& event);
625 virtual void OnSetFocus(bool enable); 629 virtual void OnSetFocus(bool enable);
626 #if OS_MACOSX 630 #if OS_MACOSX
627 virtual void OnWasHidden(); 631 virtual void OnWasHidden();
628 virtual void OnWasRestored(bool needs_repainting); 632 virtual void OnWasRestored(bool needs_repainting);
629 #endif 633 #endif
630 634
631 private: 635 private:
632 // For unit tests. 636 // For unit tests.
637 friend class ExternalPopupMenuTest;
638 friend class PepperDeviceTest;
633 friend class RenderViewTest; 639 friend class RenderViewTest;
634 friend class PepperDeviceTest; 640
641 FRIEND_TEST_ALL_PREFIXES(ExternalPopupMenuTest, NormalCase);
642 FRIEND_TEST_ALL_PREFIXES(ExternalPopupMenuTest, ShowPopupThenNavigate);
635 FRIEND_TEST_ALL_PREFIXES(RenderViewTest, OnNavStateChanged); 643 FRIEND_TEST_ALL_PREFIXES(RenderViewTest, OnNavStateChanged);
636 FRIEND_TEST_ALL_PREFIXES(RenderViewTest, OnImeStateChanged); 644 FRIEND_TEST_ALL_PREFIXES(RenderViewTest, OnImeStateChanged);
637 FRIEND_TEST_ALL_PREFIXES(RenderViewTest, ImeComposition); 645 FRIEND_TEST_ALL_PREFIXES(RenderViewTest, ImeComposition);
638 FRIEND_TEST_ALL_PREFIXES(RenderViewTest, OnSetTextDirection); 646 FRIEND_TEST_ALL_PREFIXES(RenderViewTest, OnSetTextDirection);
639 FRIEND_TEST_ALL_PREFIXES(RenderViewTest, OnPrintPages); 647 FRIEND_TEST_ALL_PREFIXES(RenderViewTest, OnPrintPages);
640 FRIEND_TEST_ALL_PREFIXES(RenderViewTest, PrintWithIframe); 648 FRIEND_TEST_ALL_PREFIXES(RenderViewTest, PrintWithIframe);
641 FRIEND_TEST_ALL_PREFIXES(RenderViewTest, PrintLayoutTest); 649 FRIEND_TEST_ALL_PREFIXES(RenderViewTest, PrintLayoutTest);
642 FRIEND_TEST_ALL_PREFIXES(RenderViewTest, OnHandleKeyboardEvent); 650 FRIEND_TEST_ALL_PREFIXES(RenderViewTest, OnHandleKeyboardEvent);
643 FRIEND_TEST_ALL_PREFIXES(RenderViewTest, InsertCharacters); 651 FRIEND_TEST_ALL_PREFIXES(RenderViewTest, InsertCharacters);
644 #if defined(OS_MACOSX) 652 #if defined(OS_MACOSX)
(...skipping 237 matching lines...) Expand 10 before | Expand all | Expand 10 after
882 const std::string& translate_script, 890 const std::string& translate_script,
883 const std::string& source_lang, 891 const std::string& source_lang,
884 const std::string& target_lang); 892 const std::string& target_lang);
885 void OnUndo(); 893 void OnUndo();
886 void OnUpdateBrowserWindowId(int window_id); 894 void OnUpdateBrowserWindowId(int window_id);
887 void OnUpdateTargetURLAck(); 895 void OnUpdateTargetURLAck();
888 void OnUpdateWebPreferences(const WebPreferences& prefs); 896 void OnUpdateWebPreferences(const WebPreferences& prefs);
889 #if defined(OS_MACOSX) 897 #if defined(OS_MACOSX)
890 void OnWindowFrameChanged(const gfx::Rect& window_frame, 898 void OnWindowFrameChanged(const gfx::Rect& window_frame,
891 const gfx::Rect& view_frame); 899 const gfx::Rect& view_frame);
900 void OnSelectPopupMenuItem(int selected_index);
892 #endif 901 #endif
893 void OnZoom(PageZoom::Function function); 902 void OnZoom(PageZoom::Function function);
894 903
895 void OnAsyncFileOpened(base::PlatformFileError error_code, 904 void OnAsyncFileOpened(base::PlatformFileError error_code,
896 IPC::PlatformFileForTransit file_for_transit, 905 IPC::PlatformFileForTransit file_for_transit,
897 int message_id); 906 int message_id);
898 907
899 // Adding a new message handler? Please add it in alphabetical order above 908 // Adding a new message handler? Please add it in alphabetical order above
900 // and put it in the same position in the .cc file. 909 // and put it in the same position in the .cc file.
901 910
(...skipping 466 matching lines...) Expand 10 before | Expand all | Expand 10 after
1368 // DOM automation bindings are enabled. 1377 // DOM automation bindings are enabled.
1369 scoped_ptr<DomAutomationController> dom_automation_controller_; 1378 scoped_ptr<DomAutomationController> dom_automation_controller_;
1370 1379
1371 // Allows DOM UI pages (new tab page, etc.) to talk to the browser. The JS 1380 // Allows DOM UI pages (new tab page, etc.) to talk to the browser. The JS
1372 // object is only exposed when DOM UI bindings are enabled. 1381 // object is only exposed when DOM UI bindings are enabled.
1373 scoped_ptr<DOMUIBindings> dom_ui_bindings_; 1382 scoped_ptr<DOMUIBindings> dom_ui_bindings_;
1374 1383
1375 // External host exposed through automation controller. 1384 // External host exposed through automation controller.
1376 scoped_ptr<ExternalHostBindings> external_host_bindings_; 1385 scoped_ptr<ExternalHostBindings> external_host_bindings_;
1377 1386
1387 // The external popup for the currently showing select popup.
1388 scoped_ptr<ExternalPopupMenu> external_popup_menu_;
1389
1378 // --------------------------------------------------------------------------- 1390 // ---------------------------------------------------------------------------
1379 // ADDING NEW DATA? Please see if it fits appropriately in one of the above 1391 // ADDING NEW DATA? Please see if it fits appropriately in one of the above
1380 // sections rather than throwing it randomly at the end. If you're adding a 1392 // sections rather than throwing it randomly at the end. If you're adding a
1381 // bunch of stuff, you should probably create a helper class and put your 1393 // bunch of stuff, you should probably create a helper class and put your
1382 // data and methods on that to avoid bloating RenderView more. 1394 // data and methods on that to avoid bloating RenderView more.
1383 // --------------------------------------------------------------------------- 1395 // ---------------------------------------------------------------------------
1384 1396
1385 DISALLOW_COPY_AND_ASSIGN(RenderView); 1397 DISALLOW_COPY_AND_ASSIGN(RenderView);
1386 }; 1398 };
1387 1399
1388 #endif // CHROME_RENDERER_RENDER_VIEW_H_ 1400 #endif // CHROME_RENDERER_RENDER_VIEW_H_
OLDNEW
« no previous file with comments | « chrome/renderer/external_popup_menu_unittest.cc ('k') | chrome/renderer/render_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698