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

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

Issue 9473001: Extract minimal RenderViewHost interface for embedders, leaving (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Merge to LKGR. Created 8 years, 9 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) 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 #include "content/browser/renderer_host/render_widget_host_view_aura.h" 5 #include "content/browser/renderer_host/render_widget_host_view_aura.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/logging.h" 8 #include "base/logging.h"
9 #include "content/browser/renderer_host/backing_store_skia.h" 9 #include "content/browser/renderer_host/backing_store_skia.h"
10 #include "content/browser/renderer_host/image_transport_factory.h" 10 #include "content/browser/renderer_host/image_transport_factory.h"
(...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after
112 private: 112 private:
113 RenderWidgetHostViewAura* view_; 113 RenderWidgetHostViewAura* view_;
114 114
115 DISALLOW_COPY_AND_ASSIGN(WindowObserver); 115 DISALLOW_COPY_AND_ASSIGN(WindowObserver);
116 }; 116 };
117 117
118 //////////////////////////////////////////////////////////////////////////////// 118 ////////////////////////////////////////////////////////////////////////////////
119 // RenderWidgetHostViewAura, public: 119 // RenderWidgetHostViewAura, public:
120 120
121 RenderWidgetHostViewAura::RenderWidgetHostViewAura(RenderWidgetHost* host) 121 RenderWidgetHostViewAura::RenderWidgetHostViewAura(RenderWidgetHost* host)
122 : ALLOW_THIS_IN_INITIALIZER_LIST(window_(new aura::Window(this))), 122 : host_(RenderWidgetHostImpl::From(host)),
123 ALLOW_THIS_IN_INITIALIZER_LIST(window_(new aura::Window(this))),
123 is_fullscreen_(false), 124 is_fullscreen_(false),
124 popup_parent_host_view_(NULL), 125 popup_parent_host_view_(NULL),
125 popup_child_host_view_(NULL), 126 popup_child_host_view_(NULL),
126 is_loading_(false), 127 is_loading_(false),
127 text_input_type_(ui::TEXT_INPUT_TYPE_NONE), 128 text_input_type_(ui::TEXT_INPUT_TYPE_NONE),
128 can_compose_inline_(true), 129 can_compose_inline_(true),
129 has_composition_text_(false), 130 has_composition_text_(false),
130 current_surface_(0), 131 current_surface_(0),
131 paint_canvas_(NULL), 132 paint_canvas_(NULL),
132 synthetic_move_sent_(false) { 133 synthetic_move_sent_(false) {
133 host_ = static_cast<RenderWidgetHostImpl*>(host);
134 host_->SetView(this); 134 host_->SetView(this);
135 window_observer_.reset(new WindowObserver(this)); 135 window_observer_.reset(new WindowObserver(this));
136 window_->AddObserver(window_observer_.get()); 136 window_->AddObserver(window_observer_.get());
137 aura::client::SetTooltipText(window_, &tooltip_); 137 aura::client::SetTooltipText(window_, &tooltip_);
138 aura::client::SetActivationDelegate(window_, this); 138 aura::client::SetActivationDelegate(window_, this);
139 } 139 }
140 140
141 RenderWidgetHostViewAura::~RenderWidgetHostViewAura() { 141 RenderWidgetHostViewAura::~RenderWidgetHostViewAura() {
142 window_->RemoveObserver(window_observer_.get()); 142 window_->RemoveObserver(window_observer_.get());
143 UnlockMouse(); 143 UnlockMouse();
(...skipping 906 matching lines...) Expand 10 before | Expand all | Expand 10 after
1050 WebKit::WebScreenInfo* results) { 1050 WebKit::WebScreenInfo* results) {
1051 const gfx::Size size = gfx::Screen::GetPrimaryMonitorSize(); 1051 const gfx::Size size = gfx::Screen::GetPrimaryMonitorSize();
1052 results->rect = WebKit::WebRect(0, 0, size.width(), size.height()); 1052 results->rect = WebKit::WebRect(0, 0, size.width(), size.height());
1053 results->availableRect = results->rect; 1053 results->availableRect = results->rect;
1054 // TODO(derat): Don't hardcode this? 1054 // TODO(derat): Don't hardcode this?
1055 results->depth = 24; 1055 results->depth = 24;
1056 results->depthPerComponent = 8; 1056 results->depthPerComponent = 8;
1057 results->verticalDPI = 96; 1057 results->verticalDPI = 96;
1058 results->horizontalDPI = 96; 1058 results->horizontalDPI = 96;
1059 } 1059 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698