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

Side by Side Diff: content/browser/renderer_host/render_widget_host_view.cc

Issue 9316073: Expose contextual menu state. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: shared linux build fix Created 8 years, 10 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2011 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 #include "content/browser/renderer_host/render_widget_host_view.h" 5 #include "content/browser/renderer_host/render_widget_host_view.h"
6 6
7 #include "base/logging.h" 7 #include "base/logging.h"
8 #include "content/browser/accessibility/browser_accessibility_manager.h" 8 #include "content/browser/accessibility/browser_accessibility_manager.h"
9 #include "third_party/WebKit/Source/WebKit/chromium/public/WebScreenInfo.h" 9 #include "third_party/WebKit/Source/WebKit/chromium/public/WebScreenInfo.h"
10 10
11 #if defined(TOOLKIT_USES_GTK) 11 #if defined(TOOLKIT_USES_GTK)
12 #include <gdk/gdkx.h> 12 #include <gdk/gdkx.h>
13 #include <gtk/gtk.h> 13 #include <gtk/gtk.h>
14 14
15 #include "content/browser/renderer_host/gtk_window_utils.h" 15 #include "content/browser/renderer_host/gtk_window_utils.h"
16 #endif 16 #endif
17 17
18 RenderWidgetHostView::RenderWidgetHostView() 18 RenderWidgetHostView::RenderWidgetHostView()
19 : popup_type_(WebKit::WebPopupTypeNone), 19 : popup_type_(WebKit::WebPopupTypeNone),
20 mouse_locked_(false), 20 mouse_locked_(false),
21 showing_context_menu_(false),
21 selection_text_offset_(0), 22 selection_text_offset_(0),
22 selection_range_(ui::Range::InvalidRange()) { 23 selection_range_(ui::Range::InvalidRange()) {
23 } 24 }
24 25
25 RenderWidgetHostView::~RenderWidgetHostView() { 26 RenderWidgetHostView::~RenderWidgetHostView() {
26 DCHECK(!mouse_locked_); 27 DCHECK(!mouse_locked_);
27 } 28 }
28 29
29 void RenderWidgetHostView::SetBackground(const SkBitmap& background) { 30 void RenderWidgetHostView::SetBackground(const SkBitmap& background) {
30 background_ = background; 31 background_ = background;
(...skipping 10 matching lines...) Expand all
41 } 42 }
42 43
43 void RenderWidgetHostView::SelectionChanged(const string16& text, 44 void RenderWidgetHostView::SelectionChanged(const string16& text,
44 size_t offset, 45 size_t offset,
45 const ui::Range& range) { 46 const ui::Range& range) {
46 selection_text_ = text; 47 selection_text_ = text;
47 selection_text_offset_ = offset; 48 selection_text_offset_ = offset;
48 selection_range_.set_start(range.start()); 49 selection_range_.set_start(range.start());
49 selection_range_.set_end(range.end()); 50 selection_range_.set_end(range.end());
50 } 51 }
52
53 void RenderWidgetHostView::SetShowingContextMenu(bool showing) {
54 DCHECK_NE(showing_context_menu_, showing);
55 showing_context_menu_ = showing;
56 }
OLDNEW
« no previous file with comments | « content/browser/renderer_host/render_widget_host_view.h ('k') | content/browser/renderer_host/render_widget_host_view_gtk.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698