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

Side by Side Diff: content/browser/web_contents/web_contents_impl.h

Issue 829913004: WIP: Plumbing through text selection granularity control support (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@unified_text_selection_diff
Patch Set: Missing file. Created 5 years, 11 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 #ifndef CONTENT_BROWSER_WEB_CONTENTS_WEB_CONTENTS_IMPL_H_ 5 #ifndef CONTENT_BROWSER_WEB_CONTENTS_WEB_CONTENTS_IMPL_H_
6 #define CONTENT_BROWSER_WEB_CONTENTS_WEB_CONTENTS_IMPL_H_ 6 #define CONTENT_BROWSER_WEB_CONTENTS_WEB_CONTENTS_IMPL_H_
7 7
8 #include <map> 8 #include <map>
9 #include <set> 9 #include <set>
10 #include <string> 10 #include <string>
(...skipping 19 matching lines...) Expand all
30 #include "content/public/browser/color_chooser.h" 30 #include "content/public/browser/color_chooser.h"
31 #include "content/public/browser/notification_observer.h" 31 #include "content/public/browser/notification_observer.h"
32 #include "content/public/browser/notification_registrar.h" 32 #include "content/public/browser/notification_registrar.h"
33 #include "content/public/browser/web_contents.h" 33 #include "content/public/browser/web_contents.h"
34 #include "content/public/common/renderer_preferences.h" 34 #include "content/public/common/renderer_preferences.h"
35 #include "content/public/common/resource_type.h" 35 #include "content/public/common/resource_type.h"
36 #include "content/public/common/three_d_api_types.h" 36 #include "content/public/common/three_d_api_types.h"
37 #include "net/base/load_states.h" 37 #include "net/base/load_states.h"
38 #include "net/http/http_response_headers.h" 38 #include "net/http/http_response_headers.h"
39 #include "third_party/WebKit/public/web/WebDragOperation.h" 39 #include "third_party/WebKit/public/web/WebDragOperation.h"
40 #include "third_party/WebKit/public/web/WebLocalFrame.h"
40 #include "ui/base/page_transition_types.h" 41 #include "ui/base/page_transition_types.h"
41 #include "ui/gfx/geometry/rect_f.h" 42 #include "ui/gfx/geometry/rect_f.h"
42 #include "ui/gfx/geometry/size.h" 43 #include "ui/gfx/geometry/size.h"
44 #include "ui/touch_selection/selection_granularity.h"
43 45
44 struct BrowserPluginHostMsg_ResizeGuest_Params; 46 struct BrowserPluginHostMsg_ResizeGuest_Params;
45 struct ViewHostMsg_DateTimeDialogValue_Params; 47 struct ViewHostMsg_DateTimeDialogValue_Params;
46 struct ViewMsg_PostMessage_Params; 48 struct ViewMsg_PostMessage_Params;
47 49
48 namespace content { 50 namespace content {
49 class BrowserPluginEmbedder; 51 class BrowserPluginEmbedder;
50 class BrowserPluginGuest; 52 class BrowserPluginGuest;
51 class BrowserPluginGuestManager; 53 class BrowserPluginGuestManager;
52 class DateTimeChooserAndroid; 54 class DateTimeChooserAndroid;
(...skipping 581 matching lines...) Expand 10 before | Expand all | Expand 10 after
634 // |details| is used to provide details on the load that just finished 636 // |details| is used to provide details on the load that just finished
635 // (but can be null if not applicable). 637 // (but can be null if not applicable).
636 void SetIsLoading(RenderViewHost* render_view_host, 638 void SetIsLoading(RenderViewHost* render_view_host,
637 bool is_loading, 639 bool is_loading,
638 bool to_different_document, 640 bool to_different_document,
639 LoadNotificationDetails* details) override; 641 LoadNotificationDetails* details) override;
640 642
641 typedef base::Callback<void(WebContents*)> CreatedCallback; 643 typedef base::Callback<void(WebContents*)> CreatedCallback;
642 644
643 // Requests the renderer to move the selection extent to a new position. 645 // Requests the renderer to move the selection extent to a new position.
644 void MoveRangeSelectionExtent(const gfx::Point& extent); 646 void MoveRangeSelectionExtent(const gfx::Point& extent,
647 ui::TextSelectionGranularity granularity);
645 648
646 // Requests the renderer to select the region between two points in the 649 // Requests the renderer to select the region between two points in the
647 // currently focused frame. 650 // currently focused frame.
648 void SelectRange(const gfx::Point& base, const gfx::Point& extent); 651 void SelectRange(const gfx::Point& base, const gfx::Point& extent);
649 652
650 // Notifies the main frame that it can continue navigation (if it was deferred 653 // Notifies the main frame that it can continue navigation (if it was deferred
651 // immediately at first response). 654 // immediately at first response).
652 void ResumeResponseDeferredAtStart(); 655 void ResumeResponseDeferredAtStart();
653 656
654 // Forces overscroll to be disabled (used by touch emulation). 657 // Forces overscroll to be disabled (used by touch emulation).
(...skipping 222 matching lines...) Expand 10 before | Expand all | Expand 10 after
877 // Tracking loading progress ------------------------------------------------- 880 // Tracking loading progress -------------------------------------------------
878 881
879 // Resets the tracking state of the current load. 882 // Resets the tracking state of the current load.
880 void ResetLoadProgressState(); 883 void ResetLoadProgressState();
881 884
882 // Calculates the progress of the current load and notifies the delegate. 885 // Calculates the progress of the current load and notifies the delegate.
883 void SendLoadProgressChanged(); 886 void SendLoadProgressChanged();
884 887
885 // Misc non-view stuff ------------------------------------------------------- 888 // Misc non-view stuff -------------------------------------------------------
886 889
890 blink::WebLocalFrame::TextGranularity ToWebTextGranularity(
891 ui::TextSelectionGranularity granularity);
892
887 // Sets the history for a specified RenderViewHost to |history_length| 893 // Sets the history for a specified RenderViewHost to |history_length|
888 // entries, with an offset of |history_offset|. 894 // entries, with an offset of |history_offset|.
889 void SetHistoryOffsetAndLengthForView(RenderViewHost* render_view_host, 895 void SetHistoryOffsetAndLengthForView(RenderViewHost* render_view_host,
890 int history_offset, 896 int history_offset,
891 int history_length); 897 int history_length);
892 898
893 // Helper functions for sending notifications. 899 // Helper functions for sending notifications.
894 void NotifyViewSwapped(RenderViewHost* old_host, RenderViewHost* new_host); 900 void NotifyViewSwapped(RenderViewHost* old_host, RenderViewHost* new_host);
895 void NotifyFrameSwapped(RenderFrameHost* old_host, RenderFrameHost* new_host); 901 void NotifyFrameSwapped(RenderFrameHost* old_host, RenderFrameHost* new_host);
896 void NotifyDisconnected(); 902 void NotifyDisconnected();
(...skipping 347 matching lines...) Expand 10 before | Expand all | Expand 10 after
1244 // Adds/removes a callback called on creation of each new WebContents. 1250 // Adds/removes a callback called on creation of each new WebContents.
1245 static void AddCreatedCallbackForTesting(const CreatedCallback& callback); 1251 static void AddCreatedCallbackForTesting(const CreatedCallback& callback);
1246 static void RemoveCreatedCallbackForTesting(const CreatedCallback& callback); 1252 static void RemoveCreatedCallbackForTesting(const CreatedCallback& callback);
1247 1253
1248 DISALLOW_COPY_AND_ASSIGN(FriendZone); 1254 DISALLOW_COPY_AND_ASSIGN(FriendZone);
1249 }; 1255 };
1250 1256
1251 } // namespace content 1257 } // namespace content
1252 1258
1253 #endif // CONTENT_BROWSER_WEB_CONTENTS_WEB_CONTENTS_IMPL_H_ 1259 #endif // CONTENT_BROWSER_WEB_CONTENTS_WEB_CONTENTS_IMPL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698