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

Side by Side Diff: ui/views/examples/examples_window_with_content.cc

Issue 14061025: ui: Use base::MessageLoop. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 7 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 | « ui/views/examples/examples_window.cc ('k') | ui/views/focus/accelerator_handler.h » ('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 "ui/views/examples/examples_window_with_content.h" 5 #include "ui/views/examples/examples_window_with_content.h"
6 6
7 #include <string> 7 #include <string>
8 8
9 #include "base/command_line.h" 9 #include "base/command_line.h"
10 #include "base/memory/scoped_vector.h" 10 #include "base/memory/scoped_vector.h"
(...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after
104 // Overridden from WidgetDelegateView: 104 // Overridden from WidgetDelegateView:
105 virtual bool CanResize() const OVERRIDE { return true; } 105 virtual bool CanResize() const OVERRIDE { return true; }
106 virtual bool CanMaximize() const OVERRIDE { return true; } 106 virtual bool CanMaximize() const OVERRIDE { return true; }
107 virtual string16 GetWindowTitle() const OVERRIDE { 107 virtual string16 GetWindowTitle() const OVERRIDE {
108 return ASCIIToUTF16("Views Examples"); 108 return ASCIIToUTF16("Views Examples");
109 } 109 }
110 virtual View* GetContentsView() OVERRIDE { return this; } 110 virtual View* GetContentsView() OVERRIDE { return this; }
111 virtual void WindowClosing() OVERRIDE { 111 virtual void WindowClosing() OVERRIDE {
112 instance_ = NULL; 112 instance_ = NULL;
113 if (operation_ == QUIT_ON_CLOSE) 113 if (operation_ == QUIT_ON_CLOSE)
114 MessageLoopForUI::current()->Quit(); 114 base::MessageLoopForUI::current()->Quit();
115 } 115 }
116 116
117 // Overridden from View: 117 // Overridden from View:
118 virtual void ViewHierarchyChanged(bool is_add, 118 virtual void ViewHierarchyChanged(bool is_add,
119 View* parent, 119 View* parent,
120 View* child) OVERRIDE { 120 View* child) OVERRIDE {
121 if (is_add && child == this) 121 if (is_add && child == this)
122 InitExamplesWindow(); 122 InitExamplesWindow();
123 } 123 }
124 124
(...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after
218 widget->Show(); 218 widget->Show();
219 } 219 }
220 } 220 }
221 221
222 void LogStatus(const std::string& string) { 222 void LogStatus(const std::string& string) {
223 ExamplesWindowContents::instance()->SetStatus(string); 223 ExamplesWindowContents::instance()->SetStatus(string);
224 } 224 }
225 225
226 } // namespace examples 226 } // namespace examples
227 } // namespace views 227 } // namespace views
OLDNEW
« no previous file with comments | « ui/views/examples/examples_window.cc ('k') | ui/views/focus/accelerator_handler.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698