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

Side by Side Diff: content/browser/renderer_host/render_widget_host_view_base.h

Issue 2370393002: Extracting placeholder information from Webkit to Blimp (Closed)
Patch Set: Extracting info through RHVW Created 4 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
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_RENDERER_HOST_RENDER_WIDGET_HOST_VIEW_BASE_H_ 5 #ifndef CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_VIEW_BASE_H_
6 #define CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_VIEW_BASE_H_ 6 #define CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_VIEW_BASE_H_
7 7
8 #include <stddef.h> 8 #include <stddef.h>
9 #include <stdint.h> 9 #include <stdint.h>
10 10
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after
87 87
88 // Returns the focused RenderWidgetHost inside this |view|'s RWH. 88 // Returns the focused RenderWidgetHost inside this |view|'s RWH.
89 RenderWidgetHostImpl* GetFocusedWidget() const; 89 RenderWidgetHostImpl* GetFocusedWidget() const;
90 90
91 // RenderWidgetHostView implementation. 91 // RenderWidgetHostView implementation.
92 RenderWidgetHost* GetRenderWidgetHost() const override; 92 RenderWidgetHost* GetRenderWidgetHost() const override;
93 void SetBackgroundColor(SkColor color) override; 93 void SetBackgroundColor(SkColor color) override;
94 void SetBackgroundColorToDefault() final; 94 void SetBackgroundColorToDefault() final;
95 bool GetBackgroundOpaque() override; 95 bool GetBackgroundOpaque() override;
96 ui::TextInputClient* GetTextInputClient() override; 96 ui::TextInputClient* GetTextInputClient() override;
97 void FetchTextInputInfo(
98 base::Callback<void(const std::string&, const std::string&)>& reply)
99 override;
97 void WasUnOccluded() override {} 100 void WasUnOccluded() override {}
98 void WasOccluded() override {} 101 void WasOccluded() override {}
99 bool IsShowingContextMenu() const override; 102 bool IsShowingContextMenu() const override;
100 void SetShowingContextMenu(bool showing_menu) override; 103 void SetShowingContextMenu(bool showing_menu) override;
101 base::string16 GetSelectedText() override; 104 base::string16 GetSelectedText() override;
102 bool IsMouseLocked() override; 105 bool IsMouseLocked() override;
103 gfx::Size GetVisibleViewportSize() const override; 106 gfx::Size GetVisibleViewportSize() const override;
104 void SetInsets(const gfx::Insets& insets) override; 107 void SetInsets(const gfx::Insets& insets) override;
105 void BeginFrameSubscription( 108 void BeginFrameSubscription(
106 std::unique_ptr<RenderWidgetHostViewFrameSubscriber> subscriber) override; 109 std::unique_ptr<RenderWidgetHostViewFrameSubscriber> subscriber) override;
(...skipping 199 matching lines...) Expand 10 before | Expand all | Expand 10 after
306 // RenderWidget's window's origin. Focus and anchor bound are represented as 309 // RenderWidget's window's origin. Focus and anchor bound are represented as
307 // gfx::Rect. 310 // gfx::Rect.
308 virtual void SelectionBoundsChanged( 311 virtual void SelectionBoundsChanged(
309 const ViewHostMsg_SelectionBounds_Params& params); 312 const ViewHostMsg_SelectionBounds_Params& params);
310 313
311 // Updates the range of the marked text in an IME composition. 314 // Updates the range of the marked text in an IME composition.
312 virtual void ImeCompositionRangeChanged( 315 virtual void ImeCompositionRangeChanged(
313 const gfx::Range& range, 316 const gfx::Range& range,
314 const std::vector<gfx::Rect>& character_bounds); 317 const std::vector<gfx::Rect>& character_bounds);
315 318
319 // This method contains response for the FetchTextInputInfo request.
320 void OnTextInputInfoReply(int request_id,
321 const std::string& text,
322 const std::string& placeholder);
323
316 //---------------------------------------------------------------------------- 324 //----------------------------------------------------------------------------
317 // The following pure virtual methods are implemented by derived classes. 325 // The following pure virtual methods are implemented by derived classes.
318 326
319 // Perform all the initialization steps necessary for this object to represent 327 // Perform all the initialization steps necessary for this object to represent
320 // a popup (such as a <select> dropdown), then shows the popup at |pos|. 328 // a popup (such as a <select> dropdown), then shows the popup at |pos|.
321 virtual void InitAsPopup(RenderWidgetHostView* parent_host_view, 329 virtual void InitAsPopup(RenderWidgetHostView* parent_host_view,
322 const gfx::Rect& bounds) = 0; 330 const gfx::Rect& bounds) = 0;
323 331
324 // Perform all the initialization steps necessary for this object to represent 332 // Perform all the initialization steps necessary for this object to represent
325 // a full screen window. 333 // a full screen window.
(...skipping 162 matching lines...) Expand 10 before | Expand all | Expand 10 after
488 // destroyed before the RWHV is destroyed. 496 // destroyed before the RWHV is destroyed.
489 TextInputManager* text_input_manager_; 497 TextInputManager* text_input_manager_;
490 498
491 private: 499 private:
492 void FlushInput(); 500 void FlushInput();
493 501
494 gfx::Rect current_display_area_; 502 gfx::Rect current_display_area_;
495 503
496 uint32_t renderer_frame_number_; 504 uint32_t renderer_frame_number_;
497 505
506 typedef std::map<int,
David Trainor- moved to gerrit 2016/10/26 01:36:42 using?
shaktisahu 2016/10/31 23:13:58 Done.
507 base::Callback<void(const std::string&, const std::string&)>>
David Trainor- moved to gerrit 2016/10/26 01:36:42 Pull out a callback with using?
shaktisahu 2016/10/31 23:13:59 Done.
508 TextInputReplyMap;
509 TextInputReplyMap text_input_callbacks_;
510
511 int next_request_id_;
David Trainor- moved to gerrit 2016/10/26 01:36:42 Should this just be in an anonymous namespace in t
shaktisahu 2016/10/31 23:13:59 Done.
512
498 base::OneShotTimer flush_input_timer_; 513 base::OneShotTimer flush_input_timer_;
499 514
500 base::ObserverList<RenderWidgetHostViewBaseObserver> observers_; 515 base::ObserverList<RenderWidgetHostViewBaseObserver> observers_;
501 516
502 base::WeakPtrFactory<RenderWidgetHostViewBase> weak_factory_; 517 base::WeakPtrFactory<RenderWidgetHostViewBase> weak_factory_;
503 518
504 DISALLOW_COPY_AND_ASSIGN(RenderWidgetHostViewBase); 519 DISALLOW_COPY_AND_ASSIGN(RenderWidgetHostViewBase);
505 }; 520 };
506 521
507 } // namespace content 522 } // namespace content
508 523
509 #endif // CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_VIEW_BASE_H_ 524 #endif // CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_VIEW_BASE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698