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

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

Issue 10566009: app_list: Fix shadow bleeds over launcher button and steals mouse events (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 6 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/bind_helpers.h" 8 #include "base/bind_helpers.h"
9 #include "base/command_line.h" 9 #include "base/command_line.h"
10 #include "base/debug/trace_event.h" 10 #include "base/debug/trace_event.h"
(...skipping 124 matching lines...) Expand 10 before | Expand all | Expand 10 after
135 } 135 }
136 136
137 } // namespace 137 } // namespace
138 138
139 // We have to implement the WindowObserver interface on a separate object 139 // We have to implement the WindowObserver interface on a separate object
140 // because clang doesn't like implementing multiple interfaces that have 140 // because clang doesn't like implementing multiple interfaces that have
141 // methods with the same name. This object is owned by the 141 // methods with the same name. This object is owned by the
142 // RenderWidgetHostViewAura. 142 // RenderWidgetHostViewAura.
143 class RenderWidgetHostViewAura::WindowObserver : public aura::WindowObserver { 143 class RenderWidgetHostViewAura::WindowObserver : public aura::WindowObserver {
144 public: 144 public:
145 WindowObserver(RenderWidgetHostViewAura* view) : view_(view) {} 145 explicit WindowObserver(RenderWidgetHostViewAura* view) : view_(view) {}
146 virtual ~WindowObserver() {} 146 virtual ~WindowObserver() {}
147 147
148 // Overridden from aura::WindowObserver: 148 // Overridden from aura::WindowObserver:
149 virtual void OnWindowRemovingFromRootWindow(aura::Window* window) OVERRIDE { 149 virtual void OnWindowRemovingFromRootWindow(aura::Window* window) OVERRIDE {
150 view_->RemovingFromRootWindow(); 150 view_->RemovingFromRootWindow();
151 } 151 }
152 152
153 private: 153 private:
154 RenderWidgetHostViewAura* view_; 154 RenderWidgetHostViewAura* view_;
155 155
156 DISALLOW_COPY_AND_ASSIGN(WindowObserver); 156 DISALLOW_COPY_AND_ASSIGN(WindowObserver);
157 }; 157 };
158 158
159 class RenderWidgetHostViewAura::ResizeLock : 159 class RenderWidgetHostViewAura::ResizeLock
160 public base::SupportsWeakPtr<RenderWidgetHostViewAura::ResizeLock> { 160 : public base::SupportsWeakPtr<RenderWidgetHostViewAura::ResizeLock> {
161 public: 161 public:
162 ResizeLock(aura::RootWindow* root_window, const gfx::Size new_size) 162 ResizeLock(aura::RootWindow* root_window, const gfx::Size new_size)
163 : root_window_(root_window), 163 : root_window_(root_window),
164 new_size_(new_size), 164 new_size_(new_size),
165 compositor_lock_(root_window_->GetCompositorLock()) { 165 compositor_lock_(root_window_->GetCompositorLock()) {
166 root_window_->HoldMouseMoves(); 166 root_window_->HoldMouseMoves();
167 167
168 BrowserThread::PostDelayedTask( 168 BrowserThread::PostDelayedTask(
169 BrowserThread::UI, FROM_HERE, 169 BrowserThread::UI, FROM_HERE,
170 base::Bind(&RenderWidgetHostViewAura::ResizeLock::CancelLock, 170 base::Bind(&RenderWidgetHostViewAura::ResizeLock::CancelLock,
(...skipping 1002 matching lines...) Expand 10 before | Expand all | Expand 10 after
1173 } 1173 }
1174 1174
1175 void RenderWidgetHostViewAura::OnWindowDestroyed() { 1175 void RenderWidgetHostViewAura::OnWindowDestroyed() {
1176 host_->ViewDestroyed(); 1176 host_->ViewDestroyed();
1177 delete this; 1177 delete this;
1178 } 1178 }
1179 1179
1180 void RenderWidgetHostViewAura::OnWindowVisibilityChanged(bool visible) { 1180 void RenderWidgetHostViewAura::OnWindowVisibilityChanged(bool visible) {
1181 } 1181 }
1182 1182
1183 bool RenderWidgetHostViewAura::HasHitTestMask() const {
1184 return false;
1185 }
1186
1187 void RenderWidgetHostViewAura::GetHitTestMask(gfx::Path* mask) const {
1188 }
1189
1183 //////////////////////////////////////////////////////////////////////////////// 1190 ////////////////////////////////////////////////////////////////////////////////
1184 // RenderWidgetHostViewAura, aura::client::ActivationDelegate implementation: 1191 // RenderWidgetHostViewAura, aura::client::ActivationDelegate implementation:
1185 1192
1186 bool RenderWidgetHostViewAura::ShouldActivate(const aura::Event* event) { 1193 bool RenderWidgetHostViewAura::ShouldActivate(const aura::Event* event) {
1187 if (event && event->type() == ui::ET_MOUSE_PRESSED) 1194 if (event && event->type() == ui::ET_MOUSE_PRESSED)
1188 host_->OnMouseActivate(); 1195 host_->OnMouseActivate();
1189 return is_fullscreen_; 1196 return is_fullscreen_;
1190 } 1197 }
1191 1198
1192 void RenderWidgetHostViewAura::OnActivated() { 1199 void RenderWidgetHostViewAura::OnActivated() {
(...skipping 173 matching lines...) Expand 10 before | Expand all | Expand 10 after
1366 RenderWidgetHostView* RenderWidgetHostView::CreateViewForWidget( 1373 RenderWidgetHostView* RenderWidgetHostView::CreateViewForWidget(
1367 RenderWidgetHost* widget) { 1374 RenderWidgetHost* widget) {
1368 return new RenderWidgetHostViewAura(widget); 1375 return new RenderWidgetHostViewAura(widget);
1369 } 1376 }
1370 1377
1371 // static 1378 // static
1372 void content::RenderWidgetHostViewPort::GetDefaultScreenInfo( 1379 void content::RenderWidgetHostViewPort::GetDefaultScreenInfo(
1373 WebKit::WebScreenInfo* results) { 1380 WebKit::WebScreenInfo* results) {
1374 GetScreenInfoForWindow(results, NULL); 1381 GetScreenInfoForWindow(results, NULL);
1375 } 1382 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698