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

Side by Side Diff: chrome/browser/ui/views/frame/app_non_client_frame_view_aura.cc

Issue 10795013: Rename bounds accessors to be intuitive and consistent (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 8 years, 5 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
« no previous file with comments | « chrome/browser/ui/views/find_bar_host.cc ('k') | chrome/browser/ui/views/frame/browser_view.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 "chrome/browser/ui/views/frame/app_non_client_frame_view_aura.h" 5 #include "chrome/browser/ui/views/frame/app_non_client_frame_view_aura.h"
6 6
7 #include "base/debug/stack_trace.h" 7 #include "base/debug/stack_trace.h"
8 #include "chrome/browser/ui/views/frame/browser_frame.h" 8 #include "chrome/browser/ui/views/frame/browser_frame.h"
9 #include "chrome/browser/ui/views/frame/browser_view.h" 9 #include "chrome/browser/ui/views/frame/browser_view.h"
10 #include "grit/generated_resources.h" // Accessibility names 10 #include "grit/generated_resources.h" // Accessibility names
(...skipping 147 matching lines...) Expand 10 before | Expand all | Expand 10 after
158 }; 158 };
159 159
160 class AppNonClientFrameViewAura::Host : public views::MouseWatcherHost { 160 class AppNonClientFrameViewAura::Host : public views::MouseWatcherHost {
161 public: 161 public:
162 explicit Host(AppNonClientFrameViewAura* owner) : owner_(owner) {} 162 explicit Host(AppNonClientFrameViewAura* owner) : owner_(owner) {}
163 virtual ~Host() {} 163 virtual ~Host() {}
164 164
165 virtual bool Contains( 165 virtual bool Contains(
166 const gfx::Point& screen_point, 166 const gfx::Point& screen_point,
167 views::MouseWatcherHost::MouseEventType type) OVERRIDE { 167 views::MouseWatcherHost::MouseEventType type) OVERRIDE {
168 gfx::Rect top_margin = owner_->GetScreenBounds(); 168 gfx::Rect top_margin = owner_->GetBoundsInScreen();
169 top_margin.set_height(kTopMargin); 169 top_margin.set_height(kTopMargin);
170 gfx::Rect control_bounds = owner_->GetControlBounds(); 170 gfx::Rect control_bounds = owner_->GetControlBounds();
171 control_bounds.Inset(kShadowStart, 0, 0, kShadowStart); 171 control_bounds.Inset(kShadowStart, 0, 0, kShadowStart);
172 return top_margin.Contains(screen_point) || 172 return top_margin.Contains(screen_point) ||
173 control_bounds.Contains(screen_point); 173 control_bounds.Contains(screen_point);
174 } 174 }
175 175
176 private: 176 private:
177 AppNonClientFrameViewAura* owner_; 177 AppNonClientFrameViewAura* owner_;
178 178
(...skipping 145 matching lines...) Expand 10 before | Expand all | Expand 10 after
324 bool AppNonClientFrameViewAura::IsShowingControls() const { 324 bool AppNonClientFrameViewAura::IsShowingControls() const {
325 return control_widget_ && control_widget_->IsVisible(); 325 return control_widget_ && control_widget_->IsVisible();
326 } 326 }
327 327
328 void AppNonClientFrameViewAura::Restore() { 328 void AppNonClientFrameViewAura::Restore() {
329 if (control_widget_) 329 if (control_widget_)
330 control_widget_->Close(); 330 control_widget_->Close();
331 mouse_watcher_.Stop(); 331 mouse_watcher_.Stop();
332 frame()->Restore(); 332 frame()->Restore();
333 } 333 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/views/find_bar_host.cc ('k') | chrome/browser/ui/views/frame/browser_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698