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

Side by Side Diff: mash/task_viewer/task_viewer.cc

Issue 1848653006: Random wm frame painting fixes (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: override Created 4 years, 8 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
« no previous file with comments | « components/mus/public/cpp/window.h ('k') | mash/wm/frame/non_client_frame_view_mash.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 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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 "mash/task_viewer/task_viewer.h" 5 #include "mash/task_viewer/task_viewer.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include "base/bind.h" 10 #include "base/bind.h"
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after
81 std::string name; 81 std::string name;
82 }; 82 };
83 83
84 84
85 // Overridden from views::WidgetDelegate: 85 // Overridden from views::WidgetDelegate:
86 views::View* GetContentsView() override { return this; } 86 views::View* GetContentsView() override { return this; }
87 base::string16 GetWindowTitle() const override { 87 base::string16 GetWindowTitle() const override {
88 // TODO(beng): use resources. 88 // TODO(beng): use resources.
89 return base::ASCIIToUTF16("Tasks"); 89 return base::ASCIIToUTF16("Tasks");
90 } 90 }
91 bool CanResize() const override { return true; }
92 bool CanMaximize() const override { return true; }
93 bool CanMinimize() const override { return true; }
91 94
92 gfx::ImageSkia GetWindowAppIcon() override { 95 gfx::ImageSkia GetWindowAppIcon() override {
93 // TODO(jamescook): Create a new .pak file for this app and make a custom 96 // TODO(jamescook): Create a new .pak file for this app and make a custom
94 // icon, perhaps one that looks like the Chrome OS task viewer icon. 97 // icon, perhaps one that looks like the Chrome OS task viewer icon.
95 ResourceBundle& rb = ResourceBundle::GetSharedInstance(); 98 ResourceBundle& rb = ResourceBundle::GetSharedInstance();
96 return *rb.GetImageSkiaNamed(IDR_NOTIFICATION_SETTINGS); 99 return *rb.GetImageSkiaNamed(IDR_NOTIFICATION_SETTINGS);
97 } 100 }
98 101
99 // Overridden from views::View: 102 // Overridden from views::View:
100 void Layout() override { 103 void Layout() override {
(...skipping 186 matching lines...) Expand 10 before | Expand all | Expand 10 after
287 290
288 TaskViewerContents* task_viewer = new TaskViewerContents( 291 TaskViewerContents* task_viewer = new TaskViewerContents(
289 std::move(request), std::move(catalog)); 292 std::move(request), std::move(catalog));
290 views::Widget* window = views::Widget::CreateWindowWithContextAndBounds( 293 views::Widget* window = views::Widget::CreateWindowWithContextAndBounds(
291 task_viewer, nullptr, gfx::Rect(10, 10, 500, 500)); 294 task_viewer, nullptr, gfx::Rect(10, 10, 500, 500));
292 window->Show(); 295 window->Show();
293 } 296 }
294 297
295 } // namespace task_viewer 298 } // namespace task_viewer
296 } // namespace main 299 } // namespace main
OLDNEW
« no previous file with comments | « components/mus/public/cpp/window.h ('k') | mash/wm/frame/non_client_frame_view_mash.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698