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

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

Issue 10827271: Replace views::Event with ui::Event. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 8 years, 4 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 "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 100 matching lines...) Expand 10 before | Expand all | Expand 10 after
111 restore_button_->y(), 111 restore_button_->y(),
112 restore_button_->width() - kButtonOverlap + close_button_->width(), 112 restore_button_->width() - kButtonOverlap + close_button_->width(),
113 restore_button_->height()); 113 restore_button_->height());
114 114
115 views::View::OnPaint(canvas); 115 views::View::OnPaint(canvas);
116 116
117 canvas->DrawImageInt(*shadow_, 0, kShadowHeightStretch); 117 canvas->DrawImageInt(*shadow_, 0, kShadowHeightStretch);
118 } 118 }
119 119
120 virtual void ButtonPressed(views::Button* sender, 120 virtual void ButtonPressed(views::Button* sender,
121 const views::Event& event) OVERRIDE { 121 const ui::Event& event) OVERRIDE {
122 if (sender == close_button_) { 122 if (sender == close_button_) {
123 owner_->Close(); 123 owner_->Close();
124 } else if (sender == restore_button_) { 124 } else if (sender == restore_button_) {
125 restore_button_->SetState(views::CustomButton::BS_NORMAL); 125 restore_button_->SetState(views::CustomButton::BS_NORMAL);
126 owner_->Restore(); 126 owner_->Restore();
127 } 127 }
128 } 128 }
129 129
130 private: 130 private:
131 // Sets images whose ids are passed in for each of the respective states 131 // Sets images whose ids are passed in for each of the respective states
(...skipping 189 matching lines...) Expand 10 before | Expand all | Expand 10 after
321 bool AppNonClientFrameViewAura::IsShowingControls() const { 321 bool AppNonClientFrameViewAura::IsShowingControls() const {
322 return control_widget_ && control_widget_->IsVisible(); 322 return control_widget_ && control_widget_->IsVisible();
323 } 323 }
324 324
325 void AppNonClientFrameViewAura::Restore() { 325 void AppNonClientFrameViewAura::Restore() {
326 if (control_widget_) 326 if (control_widget_)
327 control_widget_->Close(); 327 control_widget_->Close();
328 mouse_watcher_.Stop(); 328 mouse_watcher_.Stop();
329 frame()->Restore(); 329 frame()->Restore();
330 } 330 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/views/find_bar_view.cc ('k') | chrome/browser/ui/views/frame/app_panel_browser_frame_view.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698